# HG changeset patch # User Matt Mackall # Date 1210610228 18000 # Node ID 0f98cae7c77fb09a2ff6594aa0deff5f4f8ec531 # Parent 10c23c1d5f33d09d271cac6aba2c2eff1b7a6f19 walk: use match.bad in statwalk diff -r 10c23c1d5f33 -r 0f98cae7c77f mercurial/dirstate.py --- a/mercurial/dirstate.py Mon May 12 11:37:08 2008 -0500 +++ b/mercurial/dirstate.py Mon May 12 11:37:08 2008 -0500 @@ -418,11 +418,10 @@ def walk(self, match): # filter out the src and stat - for src, f, st in self.statwalk(match.files(), match, badfn=match.bad): + for src, f, st in self.statwalk(match.files(), match): yield f - def statwalk(self, files, match, unknown=True, - ignored=False, badfn=None): + def statwalk(self, files, match, unknown=True, ignored=False): ''' walk recursively through the directory tree, finding all files matched by the match function @@ -438,7 +437,9 @@ def fwarn(f, msg): self._ui.warn('%s: %s\n' % (self.pathto(ff), msg)) return False - badfn = badfn or fwarn + badfn = fwarn + if hasattr(match, 'bad'): + badfn = match.bad # walk all files by default if not files: