diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-12-16 15:27:49 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-12-16 15:27:49 -0800 |
commit | 031b5a9ad3e666554c321b34c4d6b63d04bdd9b3 (patch) | |
tree | 1c13aebcbfa177673c1d1e718e7c49adf9222b26 /t | |
parent | Merge branch 'vk/p4-submit-shelve' (diff) | |
parent | git-p4: support updating an existing shelved changelist (diff) | |
download | tgif-031b5a9ad3e666554c321b34c4d6b63d04bdd9b3.tar.xz |
Merge branch 'ld/p4-update-shelve'
* ld/p4-update-shelve:
git-p4: support updating an existing shelved changelist
Diffstat (limited to 't')
-rwxr-xr-x | t/t9807-git-p4-submit.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/t/t9807-git-p4-submit.sh b/t/t9807-git-p4-submit.sh index 42a5fada58..e37239e657 100755 --- a/t/t9807-git-p4-submit.sh +++ b/t/t9807-git-p4-submit.sh @@ -444,6 +444,44 @@ test_expect_success 'submit --shelve' ' ) ' +# Update an existing shelved changelist + +test_expect_success 'submit --update-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 "test-update-shelved-change" && + git p4 submit --origin=HEAD^ --shelve && + + shelf_cl=$(p4 -G changes -s shelved -m 1 |\ + marshal_dump change) && + test -n $shelf_cl && + echo "updating shelved change list $shelf_cl" && + + echo "updated-line" >>shelf.t && + echo added-file.t >added-file.t && + git add shelf.t added-file.t && + git rm -f test-update-shelved-change.t && + git commit --amend -C HEAD && + git show --stat HEAD && + git p4 submit -v --origin HEAD^ --update-shelve $shelf_cl && + echo "done git p4 submit" + ) && + ( + cd "$cli" && + change=$(p4 -G changes -s shelved -m 1 //depot/... | \ + marshal_dump change) && + p4 unshelve -c $change -s $change && + grep -q updated-line shelf.t && + p4 describe -S $change | grep added-file.t && + test_path_is_missing test-update-shelved-change.t + ) +' + test_expect_success 'kill p4d' ' kill_p4d ' |