regression test for issue1552
authorBenjamin Pollack <benjamin@bitquabit.com>
Tue, 17 Mar 2009 11:34:40 -0400
changeset 7855 aa1a87f7544f
parent 7854 423b4482c5cb
child 7856 166b6b12df44
child 7857 6af7c0e5908c
regression test for issue1552 Ensures that fetch correctly infers what to merge when pulling a repository with inactive branches.
tests/test-fetch
tests/test-fetch.out
--- a/tests/test-fetch	Tue Mar 17 11:47:40 2009 -0400
+++ b/tests/test-fetch	Tue Mar 17 11:34:40 2009 -0400
@@ -170,6 +170,21 @@
 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
--- a/tests/test-fetch.out	Tue Mar 17 11:47:40 2009 -0400
+++ b/tests/test-fetch.out	Tue Mar 17 11:34:40 2009 -0400
@@ -178,3 +178,15 @@
 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