Allow --force --dry-run

No reason for it not to work.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras
2019-06-18 18:50:52 -05:00
parent d11509cab7
commit b3cdbe8e96
2 changed files with 31 additions and 1 deletions

View File

@@ -1243,7 +1243,7 @@ def do_export(parser):
return
if dry_run:
if peer and not force_push:
if peer:
checkheads(parser.repo, peer, p_revs)
print
return

View File

@@ -760,6 +760,36 @@ test_expect_success 'remote big push dry-run' '
check_bookmark hgrepo new_bmark
'
test_expect_success 'remote big push force dry-run' '
test_when_finished "rm -rf hgrepo gitrepo*" &&
setup_big_push
(
cd gitrepo &&
check_push 0 --force --dry-run --all <<-\EOF
master
good_bmark
branches/good_branch
new_bmark:new
branches/new_branch:new
bad_bmark1:forced-update
bad_bmark2:forced-update
branches/bad_branch:forced-update
EOF
) &&
check_branch hgrepo default one &&
check_branch hgrepo good_branch "good branch" &&
check_branch hgrepo bad_branch "bad branch" &&
check_branch hgrepo new_branch &&
check_bookmark hgrepo good_bmark one &&
check_bookmark hgrepo bad_bmark1 one &&
check_bookmark hgrepo bad_bmark2 one &&
check_bookmark hgrepo new_bmark
'
test_expect_success 'remote double failed push' '
test_when_finished "rm -rf hgrepo gitrepo*" &&