Mercurial > hg
changeset 6755:f8299c84b5b6
dirstate: fold statwalk and walk
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 26 Jun 2008 14:35:50 -0500 |
parents | 0b700faaef32 |
children | d56ceb82cddb |
files | mercurial/dirstate.py mercurial/localrepo.py |
diffstat | 2 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Thu Jun 26 14:35:50 2008 -0500 +++ b/mercurial/dirstate.py Thu Jun 26 14:35:50 2008 -0500 @@ -475,12 +475,7 @@ return True return False - def walk(self, match): - # filter out the src and stat - for src, f, st in self.statwalk(match): - yield f - - def statwalk(self, match, unknown=True, ignored=False): + def walk(self, match, unknown, ignored): ''' walk recursively through the directory tree, finding all files matched by the match function @@ -631,7 +626,6 @@ def status(self, match, ignored, clean, unknown): listignored, listclean, listunknown = ignored, clean, unknown - lookup, modified, added, unknown, ignored = [], [], [], [], [] removed, deleted, clean = [], [], [] @@ -648,7 +642,7 @@ dadd = deleted.append cadd = clean.append - for src, fn, st in self.statwalk(match, listunknown, listignored): + for src, fn, st in self.walk(match, listunknown, listignored): if fn not in dmap: if (listignored or match.exact(fn)) and self._dirignore(fn): if listignored:
--- a/mercurial/localrepo.py Thu Jun 26 14:35:50 2008 -0500 +++ b/mercurial/localrepo.py Thu Jun 26 14:35:50 2008 -0500 @@ -968,7 +968,7 @@ and match(fn): yield fn else: - for fn in self.dirstate.walk(match): + for src, fn, st in self.dirstate.walk(match, True, False): yield fn def status(self, node1=None, node2=None, match=None,