diff mercurial/cmdutil.py @ 32362:7b3c27af90c2

cmdutil: use repo[None].walk instead of repo.walk
author Augie Fackler <augie@google.com>
date Thu, 18 May 2017 18:00:52 -0400
parents d47d7d3bd07b
children 04baab18d60a
line wrap: on
line diff
--- 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`