diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-05-24 21:29:42 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-28 08:00:35 -0700 |
commit | 747b61c6a66b5af279fdc1f919e9519045ed097a (patch) | |
tree | 50d9904751a9317aef544ee1141cce8e73ea2c01 | |
parent | remote-hg: add test for diverged push (diff) | |
download | tgif-747b61c6a66b5af279fdc1f919e9519045ed097a.tar.xz |
remote-hg: add test for bookmark diverge
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | contrib/remote-helpers/test-hg.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index f4dac526ee..5b54e4b5c8 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -341,4 +341,33 @@ test_expect_failure 'remote push diverged' ' check_branch hgrepo default bump ' +test_expect_failure 'remote update bookmark diverge' ' + test_when_finished "rm -rf gitrepo*" && + + ( + cd hgrepo && + hg checkout tip^ && + hg bookmark diverge + ) && + + git clone "hg::hgrepo" gitrepo && + + ( + cd hgrepo && + echo "bump bookmark" > content && + hg commit -m "bump bookmark" + ) && + + ( + cd gitrepo && + git checkout --quiet diverge && + echo diverge > content && + git commit -a -m diverge && + test_expect_code 1 git push 2> error && + grep "^ ! \[rejected\] *diverge -> diverge (non-fast-forward)$" error + ) && + + check_bookmark hgrepo diverge "bump bookmark" +' + test_done |