comparison mercurial/cmdutil.py @ 32401: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
comparison
equal deleted inserted replaced
32400:124ee239d9cb 32401:7b3c27af90c2
607 if after: 607 if after:
608 badstates = '?' 608 badstates = '?'
609 else: 609 else:
610 badstates = '?r' 610 badstates = '?r'
611 m = scmutil.match(repo[None], [pat], opts, globbed=True) 611 m = scmutil.match(repo[None], [pat], opts, globbed=True)
612 for abs in repo.walk(m): 612 for abs in repo[None].walk(m):
613 state = repo.dirstate[abs] 613 state = repo.dirstate[abs]
614 rel = m.rel(abs) 614 rel = m.rel(abs)
615 exact = m.exact(abs) 615 exact = m.exact(abs)
616 if state in badstates: 616 if state in badstates:
617 if exact and state == '?': 617 if exact and state == '?':
2939 2939
2940 # we'll need this later 2940 # we'll need this later
2941 targetsubs = sorted(s for s in wctx.substate if m(s)) 2941 targetsubs = sorted(s for s in wctx.substate if m(s))
2942 2942
2943 if not m.always(): 2943 if not m.always():
2944 for abs in repo.walk(matchmod.badmatch(m, lambda x, y: False)): 2944 matcher = matchmod.badmatch(m, lambda x, y: False)
2945 for abs in repo[None].walk(matcher):
2945 names[abs] = m.rel(abs), m.exact(abs) 2946 names[abs] = m.rel(abs), m.exact(abs)
2946 2947
2947 # walk target manifest to fill `names` 2948 # walk target manifest to fill `names`
2948 2949
2949 def badfn(path, msg): 2950 def badfn(path, msg):