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.
--- a/mercurial/cmdutil.py Fri Sep 03 12:58:51 2010 +0200
+++ b/mercurial/cmdutil.py Fri Sep 03 12:58:51 2010 +0200
@@ -263,7 +263,8 @@
if not globbed and default == 'relpath':
pats = expandpats(pats or [])
m = matchmod.match(repo.root, repo.getcwd(), pats,
- opts.get('include'), opts.get('exclude'), default)
+ opts.get('include'), opts.get('exclude'), default,
+ auditor=repo.auditor)
def badfn(f, msg):
repo.ui.warn("%s: %s\n" % (m.rel(f), msg))
m.bad = badfn
--- a/mercurial/dirstate.py Fri Sep 03 12:58:51 2010 +0200
+++ b/mercurial/dirstate.py Fri Sep 03 12:58:51 2010 +0200
@@ -498,6 +498,8 @@
skipstep3 = True
files = set(match.files())
+ for s in subrepos:
+ files = [f for f in files if not f.startswith(s + "/")]
if not files or '.' in files:
files = ['']
results = dict.fromkeys(subrepos)