# HG changeset patch # User Matt Mackall # Date 1161966250 18000 # Node ID 26b556c1d01dca6dac0e7f776a141188473652b6 # Parent 730ca93ed7889404de27533880e5f1b7b0dea1a8 improve walk docstrings diff -r 730ca93ed788 -r 26b556c1d01d mercurial/dirstate.py --- a/mercurial/dirstate.py Fri Oct 27 00:38:42 2006 -0500 +++ b/mercurial/dirstate.py Fri Oct 27 11:24:10 2006 -0500 @@ -365,6 +365,8 @@ 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() diff -r 730ca93ed788 -r 26b556c1d01d mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Oct 27 00:38:42 2006 -0500 +++ b/mercurial/localrepo.py Fri Oct 27 11:24:10 2006 -0500 @@ -714,6 +714,18 @@ 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]):