##// END OF EJS Templates
dirstate: fold statwalk and walk
Matt Mackall -
r6755:f8299c84 default
parent child Browse files
Show More
@@ -475,12 +475,7 b' class dirstate(object):'
475 return True
475 return True
476 return False
476 return False
477
477
478 def walk(self, match):
478 def walk(self, match, unknown, ignored):
479 # filter out the src and stat
480 for src, f, st in self.statwalk(match):
481 yield f
482
483 def statwalk(self, match, unknown=True, ignored=False):
484 '''
479 '''
485 walk recursively through the directory tree, finding all files
480 walk recursively through the directory tree, finding all files
486 matched by the match function
481 matched by the match function
@@ -631,7 +626,6 b' class dirstate(object):'
631
626
632 def status(self, match, ignored, clean, unknown):
627 def status(self, match, ignored, clean, unknown):
633 listignored, listclean, listunknown = ignored, clean, unknown
628 listignored, listclean, listunknown = ignored, clean, unknown
634
635 lookup, modified, added, unknown, ignored = [], [], [], [], []
629 lookup, modified, added, unknown, ignored = [], [], [], [], []
636 removed, deleted, clean = [], [], []
630 removed, deleted, clean = [], [], []
637
631
@@ -648,7 +642,7 b' class dirstate(object):'
648 dadd = deleted.append
642 dadd = deleted.append
649 cadd = clean.append
643 cadd = clean.append
650
644
651 for src, fn, st in self.statwalk(match, listunknown, listignored):
645 for src, fn, st in self.walk(match, listunknown, listignored):
652 if fn not in dmap:
646 if fn not in dmap:
653 if (listignored or match.exact(fn)) and self._dirignore(fn):
647 if (listignored or match.exact(fn)) and self._dirignore(fn):
654 if listignored:
648 if listignored:
@@ -968,7 +968,7 b' class localrepository(repo.repository):'
968 and match(fn):
968 and match(fn):
969 yield fn
969 yield fn
970 else:
970 else:
971 for fn in self.dirstate.walk(match):
971 for src, fn, st in self.dirstate.walk(match, True, False):
972 yield fn
972 yield fn
973
973
974 def status(self, node1=None, node2=None, match=None,
974 def status(self, node1=None, node2=None, match=None,
General Comments 0
You need to be logged in to leave comments. Login now