Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 6582:5acbdd3941c4
walk: remove remaining users of cmdutils.matchpats
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 May 2008 11:37:07 -0500 |
parents | 1ae7cb678d24 |
children | 29c77e5dfb3c |
comparison
equal
deleted
inserted
replaced
6581:1ae7cb678d24 | 6582:5acbdd3941c4 |
---|---|
232 def badfn(f, msg): | 232 def badfn(f, msg): |
233 repo.ui.warn("%s: %s\n" % (m.rel(f), msg)) | 233 repo.ui.warn("%s: %s\n" % (m.rel(f), msg)) |
234 return False | 234 return False |
235 m.bad = badfn | 235 m.bad = badfn |
236 return m | 236 return m |
237 | |
238 def matchpats(repo, pats=[], opts={}, globbed=False, default='relpath'): | |
239 m = match(repo, pats, opts, globbed, default) | |
240 return m.files(), m, m.anypats() | |
241 | 237 |
242 def walk(repo, match, node=None): | 238 def walk(repo, match, node=None): |
243 for src, fn in repo.walk(node, match): | 239 for src, fn in repo.walk(node, match): |
244 yield src, fn, match.rel(fn), match.exact(fn) | 240 yield src, fn, match.rel(fn), match.exact(fn) |
245 | 241 |
1180 elif f not in repo.dirstate: | 1176 elif f not in repo.dirstate: |
1181 raise util.Abort(_("file %s not tracked!") % rel) | 1177 raise util.Abort(_("file %s not tracked!") % rel) |
1182 else: | 1178 else: |
1183 files = [] | 1179 files = [] |
1184 try: | 1180 try: |
1185 return commitfunc(ui, repo, files, message, match, opts) | 1181 return commitfunc(ui, repo, files, message, m, opts) |
1186 except ValueError, inst: | 1182 except ValueError, inst: |
1187 raise util.Abort(str(inst)) | 1183 raise util.Abort(str(inst)) |