diff --git a/tests/test-fetch b/tests/test-fetch --- a/tests/test-fetch +++ b/tests/test-fetch @@ -170,6 +170,21 @@ echo '% parent should be 0 (fetch did no hg -R n2 parents --template '{rev}\n' rm -fr n1 n2 +echo % test fetch with inactive branches +hg init ib1 +echo a > ib1/a +hg --cwd ib1 ci -Am base +hg --cwd ib1 branch second +echo b > ib1/b +hg --cwd ib1 ci -Am onsecond +hg --cwd ib1 branch -f default +echo c > ib1/c +hg --cwd ib1 ci -Am newdefault +hg clone ib1 ib2 +echo % fetch should succeed +hg --cwd ib2 fetch ../ib1 +rm -fr ib1 ib2 + "$TESTDIR/killdaemons.py" true diff --git a/tests/test-fetch.out b/tests/test-fetch.out --- a/tests/test-fetch.out +++ b/tests/test-fetch.out @@ -178,3 +178,15 @@ marked working directory as branch topic abort: working dir not at branch tip (use "hg update" to check out branch tip) % parent should be 0 (fetch did not update or merge anything) 0 +% test fetch with inactive branches +adding a +marked working directory as branch second +adding b +marked working directory as branch default +adding c +updating working directory +3 files updated, 0 files merged, 0 files removed, 0 files unresolved +% fetch should succeed +pulling from ../ib1 +searching for changes +no changes found