Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 12164:1849b6147831
cmdutil: use repo.auditor when constructing match object
This gives the repository control over which nested repository paths
that should be allowed via the custom path auditor.
Since paths into subrepositories are now allowed, dirstate.walk must
now filter away more paths than before.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Fri, 03 Sep 2010 12:58:51 +0200 |
parents | 6f833fc3ccab |
children | d2c5b0927c28 |
comparison
equal
deleted
inserted
replaced
12163:505f64bb58af | 12164:1849b6147831 |
---|---|
261 | 261 |
262 def match(repo, pats=[], opts={}, globbed=False, default='relpath'): | 262 def match(repo, pats=[], opts={}, globbed=False, default='relpath'): |
263 if not globbed and default == 'relpath': | 263 if not globbed and default == 'relpath': |
264 pats = expandpats(pats or []) | 264 pats = expandpats(pats or []) |
265 m = matchmod.match(repo.root, repo.getcwd(), pats, | 265 m = matchmod.match(repo.root, repo.getcwd(), pats, |
266 opts.get('include'), opts.get('exclude'), default) | 266 opts.get('include'), opts.get('exclude'), default, |
267 auditor=repo.auditor) | |
267 def badfn(f, msg): | 268 def badfn(f, msg): |
268 repo.ui.warn("%s: %s\n" % (m.rel(f), msg)) | 269 repo.ui.warn("%s: %s\n" % (m.rel(f), msg)) |
269 m.bad = badfn | 270 m.bad = badfn |
270 return m | 271 return m |
271 | 272 |