##// END OF EJS Templates
subrepo: fix pruning of subrepo filenames in dirstate (issue2619)
trbs -
r13339:22167be0 stable
parent child Browse files
Show More
@@ -506,7 +506,7 b' class dirstate(object):'
506 if files[i] < subpath:
506 if files[i] < subpath:
507 i += 1
507 i += 1
508 continue
508 continue
509 while files and files[i].startswith(subpath):
509 while i < len(files) and files[i].startswith(subpath):
510 del files[i]
510 del files[i]
511 j += 1
511 j += 1
512
512
@@ -346,3 +346,15 b' Test missing subrepo:'
346 $ rm -r foo
346 $ rm -r foo
347 $ hg status -S
347 $ hg status -S
348 warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"
348 warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"
349
350 Issue2619: IndexError: list index out of range on hg add with subrepos
351 The subrepo must sorts after the explicit filename.
352
353 $ cd ..
354 $ hg init test
355 $ cd test
356 $ hg init x
357 $ echo "x = x" >> .hgsub
358 $ hg add .hgsub
359 $ touch a x/a
360 $ hg add a x/a
General Comments 0
You need to be logged in to leave comments. Login now