cmdutil: use repo[None].walk instead of repo.walk
authorAugie Fackler <augie@google.com>
Thu, 18 May 2017 18:00:52 -0400
changeset 32401 7b3c27af90c2
parent 32400 124ee239d9cb
child 32402 a275186b989a
cmdutil: use repo[None].walk instead of repo.walk
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Thu May 18 18:00:38 2017 -0400
+++ b/mercurial/cmdutil.py	Thu May 18 18:00:52 2017 -0400
@@ -609,7 +609,7 @@
         else:
             badstates = '?r'
         m = scmutil.match(repo[None], [pat], opts, globbed=True)
-        for abs in repo.walk(m):
+        for abs in repo[None].walk(m):
             state = repo.dirstate[abs]
             rel = m.rel(abs)
             exact = m.exact(abs)
@@ -2941,7 +2941,8 @@
         targetsubs = sorted(s for s in wctx.substate if m(s))
 
         if not m.always():
-            for abs in repo.walk(matchmod.badmatch(m, lambda x, y: False)):
+            matcher = matchmod.badmatch(m, lambda x, y: False)
+            for abs in repo[None].walk(matcher):
                 names[abs] = m.rel(abs), m.exact(abs)
 
             # walk target manifest to fill `names`