Mercurial > hg
changeset 6589:0f98cae7c77f
walk: use match.bad in statwalk
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 May 2008 11:37:08 -0500 |
parents | 10c23c1d5f33 |
children | 9f80e062d71c |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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: