Mercurial > hg
diff mercurial/localrepo.py @ 6578:f242d3684f83
walk: begin refactoring badmatch handling
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 12 May 2008 11:37:07 -0500 |
parents | 569761919450 |
children | 3951e04ea989 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon May 12 11:37:07 2008 -0500 +++ b/mercurial/localrepo.py Mon May 12 11:37:07 2008 -0500 @@ -931,7 +931,7 @@ self.dirstate.invalidate() del tr, lock, wlock - def walk(self, node, match, badmatch): + def walk(self, node, match): ''' walk recursively through the directory tree or a given changeset, finding all files matched by the match @@ -963,14 +963,11 @@ ffiles = fdict.keys() ffiles.sort() for fn in ffiles: - if badmatch and badmatch(fn): - if match(fn): - yield 'b', fn - else: - self.ui.warn(_('%s: No such file in rev %s\n') - % (self.pathto(fn), short(node))) + if match.bad(fn, 'No such file in rev ' + short(node)) \ + and match(fn): + yield 'b', fn else: - for src, fn in self.dirstate.walk(match, badmatch): + for src, fn in self.dirstate.walk(match): yield src, fn def status(self, node1=None, node2=None, files=[], match=util.always,