remote-hg: add test for new bookmark special
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 25 May 2013 02:29:43 +0000 (21:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 15:01:49 +0000 (08:01 -0700)
From the point of view of Mercurial, this creates a new branch head,
and requires a forced push.

Ideally, however, we would want it to work just like in git; new
branches can be pushed without problems.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/test-hg.sh
index 5b54e4b5c88e678aa02b7c897212cdee0d96aa66..7a6e5dab51034e5096ac496e26cb76d82b715f94 100755 (executable)
@@ -370,4 +370,19 @@ test_expect_failure 'remote update bookmark diverge' '
        check_bookmark hgrepo diverge "bump bookmark"
 '
 
+test_expect_failure 'remote new bookmark multiple branch head' '
+       test_when_finished "rm -rf gitrepo*" &&
+
+       (
+       git clone "hg::hgrepo" gitrepo &&
+       cd gitrepo &&
+       git checkout --quiet -b feature-c HEAD^ &&
+       echo feature-c > content &&
+       git commit -a -m feature-c &&
+       git push --quiet origin feature-c
+       ) &&
+
+       check_bookmark hgrepo feature-c feature-c
+'
+
 test_done