mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-12 06:05:39 +01:00
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>
This commit is contained in:
15
test-hg.sh
15
test-hg.sh
@@ -398,9 +398,7 @@ test_expect_success 'remote new bookmark multiple branch head' '
|
|||||||
# cleanup previous stuff
|
# cleanup previous stuff
|
||||||
rm -rf hgrepo
|
rm -rf hgrepo
|
||||||
|
|
||||||
test_expect_success 'remote big push' '
|
setup_big_push () {
|
||||||
test_when_finished "rm -rf hgrepo gitrepo*" &&
|
|
||||||
|
|
||||||
(
|
(
|
||||||
hg init hgrepo &&
|
hg init hgrepo &&
|
||||||
cd hgrepo &&
|
cd hgrepo &&
|
||||||
@@ -459,8 +457,17 @@ test_expect_success 'remote big push' '
|
|||||||
|
|
||||||
git checkout -q -b branches/new_branch master &&
|
git checkout -q -b branches/new_branch master &&
|
||||||
echo ten > content &&
|
echo ten > content &&
|
||||||
git commit -q -a -m ten &&
|
git commit -q -a -m ten
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
test_expect_success 'remote big push' '
|
||||||
|
test_when_finished "rm -rf hgrepo gitrepo*" &&
|
||||||
|
|
||||||
|
setup_big_push
|
||||||
|
|
||||||
|
(
|
||||||
|
cd gitrepo &&
|
||||||
test_expect_code 1 git push origin master \
|
test_expect_code 1 git push origin master \
|
||||||
good_bmark bad_bmark1 bad_bmark2 new_bmark \
|
good_bmark bad_bmark1 bad_bmark2 new_bmark \
|
||||||
branches/good_branch branches/bad_branch \
|
branches/good_branch branches/bad_branch \
|
||||||
|
|||||||
Reference in New Issue
Block a user