remote-hg: add setup_big_push() helper

So we don't duplicate these commands. 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 2b02a40587a4a8b7f8bd0542b57c61ec97d0ef2a
1 file changed +11 -4
contrib/remote-helpers/test-hg.sh
+11 -4
@@ -398,9 +398,7 @@ test_expect_success 'remote new bookmark multiple branch head' '
398 # cleanup previous stuff
399 rm -rf hgrepo
400
401 -test_expect_success 'remote big push' '
402 - test_when_finished "rm -rf hgrepo gitrepo*" &&
403 -
401 +setup_big_push () {
402 (
403 hg init hgrepo &&
404 cd hgrepo &&
@@ -459,8 +457,17 @@ test_expect_success 'remote big push' '
457
458 git checkout -q -b branches/new_branch master &&
459 echo ten > content &&
462 - git commit -q -a -m ten &&
460 + git commit -q -a -m ten
461 + )
462 +}
463
464 +test_expect_success 'remote big push' '
465 + test_when_finished "rm -rf hgrepo gitrepo*" &&
466 +
467 + setup_big_push
468 +
469 + (
470 + cd gitrepo &&
471 test_expect_code 1 git push origin master \
472 good_bmark bad_bmark1 bad_bmark2 new_bmark \
473 branches/good_branch branches/bad_branch \