Mercurial > hg > mercurial-crew-with-dirclash
comparison 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 |
comparison
equal
deleted
inserted
replaced
1568:1d7d0c07e8f3 | 1582:63799b01985c |
---|---|
460 return None | 460 return None |
461 return n | 461 return n |
462 | 462 |
463 def walk(self, node=None, files=[], match=util.always): | 463 def walk(self, node=None, files=[], match=util.always): |
464 if node: | 464 if node: |
465 fdict = dict.fromkeys(files) | |
465 for fn in self.manifest.read(self.changelog.read(node)[0]): | 466 for fn in self.manifest.read(self.changelog.read(node)[0]): |
466 if match(fn): yield 'm', fn | 467 fdict.pop(fn, None) |
468 if match(fn): | |
469 yield 'm', fn | |
470 for fn in fdict: | |
471 self.ui.warn(_('%s: No such file in rev %s\n') % ( | |
472 util.pathto(self.getcwd(), fn), short(node))) | |
467 else: | 473 else: |
468 for src, fn in self.dirstate.walk(files, match): | 474 for src, fn in self.dirstate.walk(files, match): |
469 yield src, fn | 475 yield src, fn |
470 | 476 |
471 def changes(self, node1 = None, node2 = None, files = [], | 477 def changes(self, node1 = None, node2 = None, files = [], |