Mercurial > hg > mercurial-crew-with-dirclash
changeset 3563:26b556c1d01d
improve walk docstrings
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 27 Oct 2006 11:24:10 -0500 |
parents | 730ca93ed788 |
children | bb44489b901f |
files | mercurial/dirstate.py mercurial/localrepo.py |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -365,6 +365,8 @@ class dirstate(object): is one of: 'f' the file was found in the directory tree 'm' the file was only in the dirstate and not in the tree + 'b' file was not found and matched badmatch + and st is the stat result if the file was found in the directory. ''' self.lazyread()
--- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -714,6 +714,18 @@ class localrepository(repo.repository): return n def walk(self, node=None, files=[], match=util.always, badmatch=None): + ''' + walk recursively through the directory tree or a given + changeset, finding all files matched by the match + function + + results are yielded in a tuple (src, filename), where src + is one of: + 'f' the file was found in the directory tree + 'm' the file was only in the dirstate and not in the tree + 'b' file was not found and matched badmatch + ''' + if node: fdict = dict.fromkeys(files) for fn in self.manifest.read(self.changelog.read(node)[0]):