diff options
Diffstat (limited to 'contrib/remote-helpers/test-hg.sh')
-rwxr-xr-x | contrib/remote-helpers/test-hg.sh | 77 |
1 files changed, 75 insertions, 2 deletions
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index 5d128a5da9..7d90056cf3 100755 --- a/contrib/remote-helpers/test-hg.sh +++ b/contrib/remote-helpers/test-hg.sh @@ -680,7 +680,7 @@ test_expect_success 'remote big push fetch first' ' ) ' -test_expect_failure 'remote big push force' ' +test_expect_success 'remote big push force' ' test_when_finished "rm -rf hgrepo gitrepo*" && setup_big_push @@ -710,7 +710,7 @@ test_expect_failure 'remote big push force' ' check_bookmark hgrepo new_bmark six ' -test_expect_failure 'remote big push dry-run' ' +test_expect_success 'remote big push dry-run' ' test_when_finished "rm -rf hgrepo gitrepo*" && setup_big_push @@ -772,4 +772,77 @@ test_expect_success 'remote double failed push' ' ) ' +test_expect_success 'clone remote with master null bookmark, then push to the bookmark' ' + test_when_finished "rm -rf gitrepo* hgrepo*" && + + hg init hgrepo && + ( + cd hgrepo && + echo a >a && + hg add a && + hg commit -m a && + hg bookmark -r null master + ) && + + git clone "hg::hgrepo" gitrepo && + check gitrepo HEAD a && + ( + cd gitrepo && + git checkout --quiet -b master && + echo b >b && + git add b && + git commit -m b && + git push origin master + ) +' + +test_expect_success 'clone remote with default null bookmark, then push to the bookmark' ' + test_when_finished "rm -rf gitrepo* hgrepo*" && + + hg init hgrepo && + ( + cd hgrepo && + echo a >a && + hg add a && + hg commit -m a && + hg bookmark -r null -f default + ) && + + git clone "hg::hgrepo" gitrepo && + check gitrepo HEAD a && + ( + cd gitrepo && + git checkout --quiet -b default && + echo b >b && + git add b && + git commit -m b && + git push origin default + ) +' + +test_expect_success 'clone remote with generic null bookmark, then push to the bookmark' ' + test_when_finished "rm -rf gitrepo* hgrepo*" && + + hg init hgrepo && + ( + cd hgrepo && + echo a >a && + hg add a && + hg commit -m a && + hg bookmark -r null bmark + ) && + + git clone "hg::hgrepo" gitrepo && + check gitrepo HEAD a && + ( + cd gitrepo && + git checkout --quiet -b bmark && + git remote -v && + echo b >b && + git add b && + git commit -m b && + git push origin bmark + ) +' + test_done |