Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/localrepo.py @ 1582:63799b01985c
fix the cat command
- improve localrepo.walk when passed a node
- make the differents walk commands in commands.py accept a node
- change commands.cat to walk over a revision
- add a test
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 06 Dec 2005 14:10:38 +0100 |
parents | 59b3639df0a9 |
children | 5c5aaaa9ab6f 11d12bd6e1dc |
line wrap: on
line diff
--- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -462,8 +462,14 @@ class localrepository(object): def walk(self, node=None, files=[], match=util.always): if node: + fdict = dict.fromkeys(files) for fn in self.manifest.read(self.changelog.read(node)[0]): - if match(fn): yield 'm', fn + fdict.pop(fn, None) + 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))) else: for src, fn in self.dirstate.walk(files, match): yield src, fn