From 5ef3831363d17ef9134dd85013edd3d46f524dc7 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Fri, 24 May 2013 21:29:45 -0500 Subject: [PATCH] remote-hg: add test for failed double push Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- test-hg.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test-hg.sh b/test-hg.sh index 66e37af..cbaac51 100755 --- a/test-hg.sh +++ b/test-hg.sh @@ -486,4 +486,28 @@ test_expect_failure 'remote big push' ' check_bookmark hgrepo new_bmark '' ' +test_expect_failure 'remote double failed push' ' + test_when_finished "rm -rf hgrepo gitrepo*" && + + ( + hg init hgrepo && + cd hgrepo && + echo zero > content && + hg add content && + hg commit -m zero && + echo one > content && + hg commit -m one + ) && + + ( + git clone "hg::hgrepo" gitrepo && + cd gitrepo && + git reset --hard HEAD^ && + echo two > content && + git commit -a -m two && + test_expect_code 1 git push && + test_expect_code 1 git push + ) +' + test_done