I am writing a wrapper script where I will be doing a mass integration to change the branching structure. For now we have a structure like this:
//depot/product/component-1/...
//depot/product/component-2/...
...
//depot/product/component-n/...
and we are moving to
//depot/product/release/component-1/...
//depot/product/release/component-2/...
...
//depot/product/release/component-n/...
I have written a wrapper script for doing a mass integration where every branch move is captured as a part of individual changelist. Like changelist 101 will have integ for component-1, changelist 102 will have for component-2 and so on. And at the end, it will submit all the changes. This is to narrow the submissions at component level.
My fear is if something bad happens in between and my script fails to submit or due to unforeseen reasons, integrations are in an intermediate state and I have to revert back everything to a state prior to running this script. How can I do that ? Is there a mechanism where I can persist the data before submitting somehow into perforce itself so that i can fall back to it?
When I say data, I mean output of
p4 files //depot/product/component-n/...@LabelTobeUsedForInteg
The constraints I have is that this script will be executed by multiple people doing their own set of integrations which is why I cant just dump the information in a text file locally. I need a solution where people having access only to perforce can get this persisted information in case they have to fall back and revert the submissions. Storing this information in DB is also out of question. :(
Is there a way to achieve this ? Thanks in advance. Really appreciate your help on this.