diff -r 1f1fc418a96c -r d436b21b20dc mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Mar 31 03:25:35 2006 -0600 +++ b/mercurial/localrepo.py Fri Mar 31 10:37:25 2006 -0800 @@ -483,7 +483,7 @@ self.hook("commit", node=hex(n), parent1=xp1, parent2=xp2) return n - def walk(self, node=None, files=[], match=util.always): + def walk(self, node=None, files=[], match=util.always, badmatch=None): if node: fdict = dict.fromkeys(files) for fn in self.manifest.read(self.changelog.read(node)[0]): @@ -491,8 +491,12 @@ if match(fn): yield 'm', fn for fn in fdict: - self.ui.warn(_('%s: No such file in rev %s\n') % ( - util.pathto(self.getcwd(), fn), short(node))) + if badmatch and badmatch(fn): + if match(fn): + yield 'b', fn + else: + self.ui.warn(_('%s: No such file in rev %s\n') % ( + util.pathto(self.getcwd(), fn), short(node))) else: for src, fn in self.dirstate.walk(files, match): yield src, fn