##// END OF EJS Templates
dirstate.walk: factor out directory traversal...
Siddharth Agarwal -
r24559:4728d6f7 default
parent child Browse files
Show More
@@ -754,9 +754,10 b' class dirstate(object):'
754 754
755 755 skipstep3 = skipstep3 and not (work or dirsnotfound)
756 756 work = [d for d in work if not dirignore(d[0])]
757 wadd = work.append
758 757
759 758 # step 2: visit subdirectories
759 def traverse(work):
760 wadd = work.append
760 761 while work:
761 762 nd, d = work.pop()
762 763 skip = None
@@ -774,10 +775,11 b' class dirstate(object):'
774 775 raise
775 776 for f, kind, st in entries:
776 777 if normalizefile:
777 # even though f might be a directory, we're only interested
778 # in comparing it to files currently in the dmap --
779 # therefore normalizefile is enough
780 nf = normalizefile(nd and (nd + "/" + f) or f, True, True)
778 # even though f might be a directory, we're only
779 # interested in comparing it to files currently in the
780 # dmap -- therefore normalizefile is enough
781 nf = normalizefile(nd and (nd + "/" + f) or f, True,
782 True)
781 783 f = d and (d + "/" + f) or f
782 784 else:
783 785 nf = nd and (nd + "/" + f) or f
@@ -799,6 +801,8 b' class dirstate(object):'
799 801 elif nf in dmap and (matchalways or matchfn(nf)):
800 802 results[nf] = None
801 803
804 traverse(work)
805
802 806 for s in subrepos:
803 807 del results[s]
804 808 del results['.hg']
General Comments 0
You need to be logged in to leave comments. Login now