]> git.ipfire.org Git - thirdparty/git.git/commitdiff
remote-hg: add test for failed double push
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 25 May 2013 02:29:45 +0000 (21:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 15:02:03 +0000 (08:02 -0700)
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 66e37af09a7d0cbd86fa992bc822b28944ffd85f..cbaac51c27c92ffc74ab7340c02153a08ff9b70f 100755 (executable)
@@ -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