Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 3532:26b556c1d01d
improve walk docstrings
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 27 Oct 2006 11:24:10 -0500 |
parents | 9383af6f236d |
children | 23f7d9621783 |
comparison
equal
deleted
inserted
replaced
3531:730ca93ed788 | 3532:26b556c1d01d |
---|---|
712 | 712 |
713 self.hook("commit", node=hex(n), parent1=xp1, parent2=xp2) | 713 self.hook("commit", node=hex(n), parent1=xp1, parent2=xp2) |
714 return n | 714 return n |
715 | 715 |
716 def walk(self, node=None, files=[], match=util.always, badmatch=None): | 716 def walk(self, node=None, files=[], match=util.always, badmatch=None): |
717 ''' | |
718 walk recursively through the directory tree or a given | |
719 changeset, finding all files matched by the match | |
720 function | |
721 | |
722 results are yielded in a tuple (src, filename), where src | |
723 is one of: | |
724 'f' the file was found in the directory tree | |
725 'm' the file was only in the dirstate and not in the tree | |
726 'b' file was not found and matched badmatch | |
727 ''' | |
728 | |
717 if node: | 729 if node: |
718 fdict = dict.fromkeys(files) | 730 fdict = dict.fromkeys(files) |
719 for fn in self.manifest.read(self.changelog.read(node)[0]): | 731 for fn in self.manifest.read(self.changelog.read(node)[0]): |
720 for ffn in fdict: | 732 for ffn in fdict: |
721 # match if the file is the exact name or a directory | 733 # match if the file is the exact name or a directory |