1

In my script, which submits some changes to perforce, I would like to add an interactive mode. The workflow should be as follow:

  1. the script changes some files which are checked out in the default change list.
  2. the script calls p4vc submit, so the user can inspect the changes and submit them as they are or make some minor changes.

However, the description of the submit form is empty and I would like to populate it from the script, so the user don't have to write it by hand.

Is it possible to pass a default description of the change list using p4vc? I could not find this information in the documentation, which is kept pretty short.

PS: I would like to avoid creating a new change list with proper description and then submit it - because if the user cancels the operation, the files would be in this change list, but I would like to keep them in the default list in this case.

ead
  • 32,758
  • 6
  • 90
  • 153

1 Answers1

1

I'm assuming that your principal question is the one contained in your 'P.S.'.

That is, you're trying to avoid leaving the files opened in a numbered pending changelist if the user decides not to perform the submit at this time.

After your script has invoked p4vc submit, your script could find out if the user halted the submit operation (by running p4 opened to see that the files were not submitted), and then could use p4 reopen to move them back into the default changelist, and p4 change -d to delete the unwanted pending numbered changelist.

Bryan Pendleton
  • 16,128
  • 3
  • 32
  • 56
  • Thank, that works, but is a little bit brittle - there are too many steps to my liking. So there is no way to achieve it by using p4vc? – ead Nov 07 '16 at 19:00
  • 1
    One more problem I have: p4vc returns directly after the calling of the submit-dialog and not after the user is done with it. Do you know a way to let the call to p4vc to wait until the user is done and return afterwards? – ead Nov 07 '16 at 19:03
  • Yuck. I was a little bit worried about that "returns early" possibility. Sadly, I have very little experience with `p4vc`. – Bryan Pendleton Nov 08 '16 at 00:42