How can I use Perforce Shelving so that one person creates the changes and the other person introduces it?

I want UserA to create a changelog in Perforce and then Shelve it. I would like UserB to be able to delete this list of changes and submit it.

It sounds simple, but Perforce unhelving does not seem to work as I expected. When UserB launches "p4 unshelve -s 1234", it cancels all changed 1234 shift files, but it does not bring the change metadata (description, fixes)! This means that UserB can copy the hidden CL to the new CL and send it (manually re-creating the description and corrections), but this leaves the old shelved CL hanging around.

The logical thing here would be for UserB to

  1. Unshelve CL
  2. View hidden CL metadata
  3. Copy this metadata to the new CL
  4. Submit a new CL
  5. Remove old pending CL
This is what the Perforce documentation recommends. There would be one small problem: UserB is not allowed to delete other CLs closed by the user! Only UserA and the p4 administrator can delete their pending CL. I do not understand why the documentation falls on it.

Has anyone had this problem before? How did you resolve it?

EDIT: I have to clarify that my question is very generalized. I am working on a tool in which UserA is the developer, and UserB is the build system itself. The developer will put off the CL, and then will have a build system and test it with a number of assemblies and tests (automatically sending the CL if he passed all these tests). Expecting that every developer will remember to remove their CL shelves if the build system presented by them seems indispensable for failure!

+8
version-control perforce shelve unshelve
source share
2 answers

How about the build system send a notification of success or failure and allow the developer to submit a list of changes?

Trying to automate submitting a change list can be difficult if any files need to be resolved. You may be able to automate some of them, but not in case of conflict.

+2
source share

You can find this feature introduced in Perforce 2013.1 to be useful:

#539809 (Bug #53058) ** Shelved changes containing files that do not require resolve may be submitted directly without unshelving first via 'p4 submit -e <shelvedChange#>'. See 'p4 help submit' for details and restrictions. 
+1
source share

All Articles