Mercurial > hg
comparison mercurial/localrepo.py @ 3019:aebc3f64b20f
fix incorrect warning when walking on a particular rev
when a directory was given instead of a file it reported
incorrectly 'No such file or directory in rev <rev>'
we test if the file is a prefix directory
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 28 Aug 2006 21:49:02 +0200 |
parents | eef469259745 |
children | 4d0e0f149581 |
comparison
equal
deleted
inserted
replaced
3018:db3f42261452 | 3019:aebc3f64b20f |
---|---|
639 | 639 |
640 def walk(self, node=None, files=[], match=util.always, badmatch=None): | 640 def walk(self, node=None, files=[], match=util.always, badmatch=None): |
641 if node: | 641 if node: |
642 fdict = dict.fromkeys(files) | 642 fdict = dict.fromkeys(files) |
643 for fn in self.manifest.read(self.changelog.read(node)[0]): | 643 for fn in self.manifest.read(self.changelog.read(node)[0]): |
644 fdict.pop(fn, None) | 644 for ffn in fdict: |
645 # match if the file is the exact name or a directory | |
646 if ffn == fn or fn.startswith("%s/" % ffn): | |
647 del fdict[ffn] | |
648 break | |
645 if match(fn): | 649 if match(fn): |
646 yield 'm', fn | 650 yield 'm', fn |
647 for fn in fdict: | 651 for fn in fdict: |
648 if badmatch and badmatch(fn): | 652 if badmatch and badmatch(fn): |
649 if match(fn): | 653 if match(fn): |