Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest way of submitting shelved changelist

Tags:

I have shelved a changelist(say X) and I have ensured its correctness. Now i want to submit the changelist. I can

  1. p4 unshelve -s X -c Y where Y is a new changelist i create before executing this command. Then p4 shelve -c X -d and lastly p4 submit -c Y
  2. Otherwise I can unshelve X, delete the shelve X and move the local copies to changelist X(p4 reopen -c X ) and submit X.
  3. The last option is to unshelve X, delete shelve X, p4 change(and edit description) and finally p4 submit

What are your suggestions with regards to :-

  1. Use 1/3 but copy paste the description that X already had to new changelists
  2. Use 2 but copy each opened file manually in command p4 reopen.

The only advantage of 2 over 1 and 3 is that I don't have to delete X(because it turned out to be my submitted changelist, while in other cases it still is "pending").

like image 245
Vineet Deoraj Avatar asked Apr 08 '13 11:04

Vineet Deoraj


People also ask

How do you shelve a changelist?

Shelve changesIn the Commit tool window Alt+0 , right-click the files or the changelist you want to put to a shelf and select Shelve changes from the context menu. In the Shelve Changes dialog, review the list of modified files.

How do I delete a shelved changelist?

To delete the Perforce P4 shelved files, use p4 shelve -d followed by the change number: p4 shelve -d -c 7033 Shelved change 7033 deleted. Having removed the shelved files by deleting the shelved change, you can remove the changelist itself: p4 change -d 7033 Change 7033 deleted.

How do I shelve perforce files?

Right-click the changelist and select Shelve. Alternately, you can shelve a checked-out file by dragging it from the pending changelist or depot pane to the Shelved Files node of the changelist where you want it shelved. P4V displays the Shelve dialog.


2 Answers

The shortest method is:

$ p4 shelve -c #changelist -d $ p4 submit -c #changelist 
like image 154
Vineet Deoraj Avatar answered Sep 20 '22 14:09

Vineet Deoraj


In the new 2013.1 release of the Perforce server, you can now do 'p4 submit -e X', which directly submits the shelf without needing to unshelve it first.

Try it, it's a great feature!

like image 29
Bryan Pendleton Avatar answered Sep 18 '22 14:09

Bryan Pendleton