I want UserA to be able to create a changelist in Perforce and then Shelve it. I would then like UserB to be able to unshelve that changelist and submit it.
This sounds simple, but Perforce unshelving doesn't seem to work the way I would expect. When UserB runs 'p4 unshelve -s 1234', it unshelves all of the changed files from change 1234, but it does not bring the change's metadata (description, job fixes) with it! This means that UserB can copy a shelved CL into a whole new CL and submit it (by manually re-creating the description and fixes), but that leaves the old shelved CL hanging around.
The logical thing here would be for UserB to
Has anyone ever had this problem before? How did you resolve it?
EDIT: I should clarify that my question is very generalized. I'm working on a tool where UserA is the developer, and UserB is the build system itself. A developer would shelve a CL and then have the build system unshelve and validate it with a series of builds and tests (automatically submitting the CL if it passed all of those tests). Expecting every developer to remember to delete their shelved CLs if the build system submitted them seems bound for failure!
What about having the build system send back a notification of success or failure, and letting the developer submit the changelist themselves?
Trying to automate submission of a changelist could get tricky if any files need to be resolved. You might be able to automate some of that, but not if there are any conflicts.
You might 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With