##// END OF EJS Templates
dirstate: use one pass to filter out files in subrepos
Martin Geisler -
r12211:798d72f3 default
parent child Browse files
Show More
@@ -497,16 +497,25 b' class dirstate(object):'
497 497 elif match.files() and not match.anypats(): # match.match, no patterns
498 498 skipstep3 = True
499 499
500 files = set(match.files())
501 for s in subrepos:
502 files = [f for f in files if not f.startswith(s + "/")]
500 files = sorted(match.files())
501 subrepos.sort()
502 i, j = 0, 0
503 while i < len(files) and j < len(subrepos):
504 subpath = subrepos[j] + "/"
505 if not files[i].startswith(subpath):
506 i += 1
507 continue
508 while files and files[i].startswith(subpath):
509 del files[i]
510 j += 1
511
503 512 if not files or '.' in files:
504 513 files = ['']
505 514 results = dict.fromkeys(subrepos)
506 515 results['.hg'] = None
507 516
508 517 # step 1: find all explicit files
509 for ff in sorted(files):
518 for ff in files:
510 519 nf = normalize(normpath(ff), False)
511 520 if nf in results:
512 521 continue
General Comments 0
You need to be logged in to leave comments. Login now