diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -233,8 +233,7 @@ def matchpats(repo, pats=[], opts={}, gl def walk(repo, pats=[], opts={}, node=None, badmatch=None, globbed=False, default='relpath'): dummy, m, dummy = matchpats(repo, pats, opts, globbed, default) - for src, fn in repo.walk(node=node, files=m.files(), match=m, - badmatch=badmatch): + for src, fn in repo.walk(node, m, badmatch): yield src, fn, m.rel(fn), m.exact(fn) def findrenames(repo, added=None, removed=None, threshold=0.5): diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -416,9 +416,10 @@ class dirstate(object): return True return False - def walk(self, files, match, badmatch): + def walk(self, match, badmatch): # filter out the stat - for src, f, st in self.statwalk(files, match, badmatch=badmatch): + for src, f, st in self.statwalk(match.files(), match, + badmatch=badmatch): yield src, f def statwalk(self, files, match, unknown=True, diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -931,7 +931,7 @@ class localrepository(repo.repository): self.dirstate.invalidate() del tr, lock, wlock - def walk(self, node, files, match, badmatch): + def walk(self, node, match, badmatch): ''' walk recursively through the directory tree or a given changeset, finding all files matched by the match @@ -945,7 +945,7 @@ class localrepository(repo.repository): ''' if node: - fdict = dict.fromkeys(files) + fdict = dict.fromkeys(match.files()) # for dirstate.walk, files=['.'] means "walk the whole tree". # follow that here, too fdict.pop('.', None) @@ -970,7 +970,7 @@ class localrepository(repo.repository): self.ui.warn(_('%s: No such file in rev %s\n') % (self.pathto(fn), short(node))) else: - for src, fn in self.dirstate.walk(files, match, badmatch): + for src, fn in self.dirstate.walk(match, badmatch): yield src, fn def status(self, node1=None, node2=None, files=[], match=util.always,