changeset 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 505f64bb58af
children b7fbf24c8a93
files mercurial/cmdutil.py mercurial/dirstate.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)