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
- Unshelve the CL
- View the shelved CL's metadata
- Copy that metadata into a new CL
- Submit the new CL
- Delete the old shelved CL
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!