remote-hg: add test for failed double push

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed May 24, 2013 at 21:29 UTC 0bf9ee5720c6d98be8bee93ab3e1a80451de767c
1 file changed +24
contrib/remote-helpers/test-hg.sh
+24
@@ -486,4 +486,28 @@ test_expect_failure 'remote big push' '
486 check_bookmark hgrepo new_bmark ''
487 '
488
489 +test_expect_failure 'remote double failed push' '
490 + test_when_finished "rm -rf hgrepo gitrepo*" &&
491 +
492 + (
493 + hg init hgrepo &&
494 + cd hgrepo &&
495 + echo zero > content &&
496 + hg add content &&
497 + hg commit -m zero &&
498 + echo one > content &&
499 + hg commit -m one
500 + ) &&
501 +
502 + (
503 + git clone "hg::hgrepo" gitrepo &&
504 + cd gitrepo &&
505 + git reset --hard HEAD^ &&
506 + echo two > content &&
507 + git commit -a -m two &&
508 + test_expect_code 1 git push &&
509 + test_expect_code 1 git push
510 + )
511 +'
512 +
513 test_done