diff -r 2dc7a2a96cfd -r 69e69b131458 tests/test-subrepo-recursion.t --- a/tests/test-subrepo-recursion.t Wed Feb 02 13:51:22 2011 +0100 +++ b/tests/test-subrepo-recursion.t Fri Feb 04 09:17:07 2011 +0100 @@ -413,3 +413,15 @@ $ rm -r foo $ hg status -S warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo" + +Issue2619: IndexError: list index out of range on hg add with subrepos +The subrepo must sorts after the explicit filename. + + $ cd .. + $ hg init test + $ cd test + $ hg init x + $ echo "x = x" >> .hgsub + $ hg add .hgsub + $ touch a x/a + $ hg add a x/a