remote-hg: add test for new bookmark special

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>
This commit is contained in:
Felipe Contreras 2013-05-24 21:29:43 -05:00 committed by Junio C Hamano
parent 747b61c6a6
commit ad22b92a81

View File

@ -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