Show More
@@ -235,6 +235,12 b' def match(repo, pats=[], opts={}, globbe' | |||||
235 | m.bad = badfn |
|
235 | m.bad = badfn | |
236 | return m |
|
236 | return m | |
237 |
|
237 | |||
|
238 | def matchall(repo): | |||
|
239 | return _match.always(repo.root, repo.getcwd()) | |||
|
240 | ||||
|
241 | def matchfiles(repo, files): | |||
|
242 | return _match.exact(repo.root, repo.getcwd(), files) | |||
|
243 | ||||
238 | def findrenames(repo, added=None, removed=None, threshold=0.5): |
|
244 | def findrenames(repo, added=None, removed=None, threshold=0.5): | |
239 | '''find renamed files -- yields (before, after, score) tuples''' |
|
245 | '''find renamed files -- yields (before, after, score) tuples''' | |
240 | if added is None or removed is None: |
|
246 | if added is None or removed is None: | |
@@ -885,7 +891,7 b' def show_changeset(ui, repo, opts, buffe' | |||||
885 | # options |
|
891 | # options | |
886 | patch = False |
|
892 | patch = False | |
887 | if opts.get('patch'): |
|
893 | if opts.get('patch'): | |
888 |
patch = matchfn or |
|
894 | patch = matchfn or matchall(repo) | |
889 |
|
895 | |||
890 | tmpl = opts.get('template') |
|
896 | tmpl = opts.get('template') | |
891 | mapfile = None |
|
897 | mapfile = None | |
@@ -1175,9 +1181,8 b' def commit(ui, repo, commitfunc, pats, o' | |||||
1175 | "unsupported file type!") % rel) |
|
1181 | "unsupported file type!") % rel) | |
1176 | elif f not in repo.dirstate: |
|
1182 | elif f not in repo.dirstate: | |
1177 | raise util.Abort(_("file %s not tracked!") % rel) |
|
1183 | raise util.Abort(_("file %s not tracked!") % rel) | |
1178 | else: |
|
1184 | m = matchfiles(repo, files) | |
1179 | files = [] |
|
|||
1180 | try: |
|
1185 | try: | |
1181 | return commitfunc(ui, repo, files, message, m, opts) |
|
1186 | return commitfunc(ui, repo, m.files(), message, m, opts) | |
1182 | except ValueError, inst: |
|
1187 | except ValueError, inst: | |
1183 | raise util.Abort(str(inst)) |
|
1188 | raise util.Abort(str(inst)) |
General Comments 0
You need to be logged in to leave comments.
Login now