diff options
author | Vinicius Kursancew <viniciusalexandre@gmail.com> | 2016-11-28 09:33:18 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-11-29 10:59:01 -0800 |
commit | b34fa5777d84abf123cd6b306e2a9a02dac4fc86 (patch) | |
tree | 5da52cec7deee2313cd0e512d2e9bcf7cbcdaf47 /t | |
parent | ac84098b7e32406a982ac01cc76a663d5605224b (diff) | |
download | git-b34fa5777d84abf123cd6b306e2a9a02dac4fc86.tar.gz git-b34fa5777d84abf123cd6b306e2a9a02dac4fc86.tar.xz |
git-p4: allow submit to create shelved changelists.
Add a --shelve command line argument which invokes p4 shelve instead
of submitting changes. After shelving the changes are reverted from the
p4 workspace.
Signed-off-by: Vinicius Kursancew <viniciusalexandre@gmail.com>
Reviewed-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t9807-git-p4-submit.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh index 593152817..42a5fada5 100755 --- a/t/t9807-git-p4-submit.sh +++ b/t/t9807-git-p4-submit.sh @@ -413,6 +413,37 @@ test_expect_success 'submit --prepare-p4-only' ' ) ' +test_expect_success 'submit --shelve' ' + test_when_finished cleanup_git && + git p4 clone --dest="$git" //depot && + ( + cd "$cli" && + p4 revert ... && + cd "$git" && + git config git-p4.skipSubmitEdit true && + test_commit "shelveme1" && + git p4 submit --origin=HEAD^ && + + echo 654321 >shelveme2.t && + echo 123456 >>shelveme1.t && + git add shelveme* && + git commit -m"shelvetest" && + git p4 submit --shelve --origin=HEAD^ && + + test_path_is_file shelveme1.t && + test_path_is_file shelveme2.t + ) && + ( + cd "$cli" && + change=$(p4 -G changes -s shelved -m 1 //depot/... | \ + marshal_dump change) && + p4 describe -S $change | grep shelveme2 && + p4 describe -S $change | grep 123456 && + test_path_is_file shelveme1.t && + test_path_is_missing shelveme2.t + ) +' + test_expect_success 'kill p4d' ' kill_p4d ' |