cmdutil: use repo.auditor when constructing match object
authorMartin Geisler <mg@lazybytes.net>
Fri, 03 Sep 2010 12:58:51 +0200
changeset 12164 1849b6147831
parent 12163 505f64bb58af
child 12165 b7fbf24c8a93
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.
mercurial/cmdutil.py
mercurial/dirstate.py
--- 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)