equal
deleted
inserted
replaced
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 |