git-p4: support updating an existing shelved changelist

Adds new option "--update-shelve CHANGELIST" which updates
an existing shelved changelist.

The original changelist must have been created by the current user.

This allows workflow something like:

   hack hack hack
   git commit
   git p4 submit --shelve
   $mail interested parties about shelved changelist
   make corrections
   git commit --amend
   git p4 submit --update-shelve $CHANGELIST
   $mail interested parties about shelved changelist
   etc

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Luke Diamand
2016-12-02 22:43:19 +00:00
committed by Junio C Hamano
parent b34fa5777d
commit 46c609e9ff
3 changed files with 71 additions and 4 deletions

View File

@ -308,6 +308,10 @@ These options can be used to modify 'git p4 submit' behavior.
After creating each shelve, the relevant files are reverted/deleted.
If you have multiple commits pending multiple shelves will be created.
--update-shelve CHANGELIST::
Update an existing shelved changelist with this commit. Implies
--shelve.
--conflict=(ask|skip|quit)::
Conflicts can occur when applying a commit to p4. When this
happens, the default behavior ("ask") is to prompt whether to