Show More
@@ -440,6 +440,10 b' class dirstate:' | |||||
440 | dc = self.map.copy() |
|
440 | dc = self.map.copy() | |
441 | # walk all files by default |
|
441 | # walk all files by default | |
442 | if not files: files = [self.root] |
|
442 | if not files: files = [self.root] | |
|
443 | known = {'.hg': 1} | |||
|
444 | def seen(fn): | |||
|
445 | if fn in known: return True | |||
|
446 | known[fn] = 1 | |||
443 | def traverse(): |
|
447 | def traverse(): | |
444 | for f in util.unique(files): |
|
448 | for f in util.unique(files): | |
445 | f = os.path.join(self.root, f) |
|
449 | f = os.path.join(self.root, f) | |
@@ -447,7 +451,7 b' class dirstate:' | |||||
447 | for dir, subdirs, fl in os.walk(f): |
|
451 | for dir, subdirs, fl in os.walk(f): | |
448 | d = dir[len(self.root) + 1:] |
|
452 | d = dir[len(self.root) + 1:] | |
449 | nd = os.path.normpath(d) |
|
453 | nd = os.path.normpath(d) | |
450 |
if nd |
|
454 | if seen(nd): | |
451 | subdirs[:] = [] |
|
455 | subdirs[:] = [] | |
452 | continue |
|
456 | continue | |
453 | for sd in subdirs: |
|
457 | for sd in subdirs: | |
@@ -468,6 +472,7 b' class dirstate:' | |||||
468 |
|
472 | |||
469 | for src, fn in util.unique(traverse()): |
|
473 | for src, fn in util.unique(traverse()): | |
470 | fn = os.path.normpath(fn) |
|
474 | fn = os.path.normpath(fn) | |
|
475 | if seen(fn): continue | |||
471 | if fn in dc: |
|
476 | if fn in dc: | |
472 | del dc[fn] |
|
477 | del dc[fn] | |
473 | elif self.ignore(fn): |
|
478 | elif self.ignore(fn): |
General Comments 0
You need to be logged in to leave comments.
Login now