diff options
author | Pete Wyckoff <pw@padd.com> | 2012-09-09 16:16:12 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-16 21:52:52 -0700 |
commit | 728b7ad8bb6491d1d8bcd7498e06474b15812d52 (patch) | |
tree | bce3d60130fa34cd6789b521fb009f9ddcbe3429 /t/t9807-git-p4-submit.sh | |
parent | ef739f0829f866b7e70e072a6744dc9cd1e12822 (diff) | |
download | git-728b7ad8bb6491d1d8bcd7498e06474b15812d52.tar.gz |
git p4: add submit --prepare-p4-only option
This option can be used to prepare the client workspace for
submission, only. It does not invoke the final "p4 submit".
A message describes how to proceed, either submitting the
changes or reverting.
Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9807-git-p4-submit.sh')
-rwxr-xr-x | t/t9807-git-p4-submit.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh index 9cb6aa79ed..0ae048f29f 100755 --- a/t/t9807-git-p4-submit.sh +++ b/t/t9807-git-p4-submit.sh @@ -375,6 +375,30 @@ test_expect_success 'description with Jobs section and bogus following text' ' make_job $(cat jobname) && test_must_fail git p4 submit 2>err && test_i18ngrep "Unknown field name" err + ) && + ( + cd "$cli" && + p4 revert desc6 && + rm desc6 + ) +' + +test_expect_success 'submit --prepare-p4-only' ' + test_when_finished cleanup_git && + git p4 clone --dest="$git" //depot && + ( + cd "$git" && + echo prep-only-add >prep-only-add && + git add prep-only-add && + git commit -m "prep only add" && + git p4 submit --prepare-p4-only >out && + test_i18ngrep "prepared for submission" out && + test_i18ngrep "must be deleted" out + ) && + ( + cd "$cli" && + test_path_is_file prep-only-add && + p4 fstat -T action prep-only-add | grep -w add ) ' |