[p4] p4 submit command without a description
perforce-user-forum at forums.perforce.com
Tue Aug 30 13:45:01 PDT 2016
Posted on behalf of forum user 'Orthoducks'.
I'm writing a program that executes P4 as a subprocess, and I'm puzzled
about how to make a submit operation work.
The case in question is a submit that doesn't provide a description on the
command line (i.e. no -d switch). The command line looks like this:
p4 submit -f submitunchanged <pathname>
When my program executed this command, P4 activated my default text editor and
opened a temporary file containing a form for entering the description. This is
pretty much what I expected; based on my experience with other change control
systems, P4 should wait for me to save the temporary file, confirm that I added
a submit message at the beginning, and proceed.
Instead, when I clicked the editor, it said that the file had been deleted, and
did I want to keep it open? Meanwhile, my program went away and never came back.
I tried executing the same command from a terminal window and got this:
Error in change specification. Error detected at line 27. Change description
missing. You must enter one. Hit return to continue...
Apparently P4 expects me to edit and save the temporary file, then "Hit
return to continue." My program went away because P4 was waiting for me to
hit return. But since I'm not calling P4 from a terminal window, I can't
How am I supposed to deal with this? P4 seems to be designed so that this use
case is impossible to practice programmatically.
"Error detected in line 27" is also a puzzle. In line 27 of what ?
Presumably of some file, but the only file involved in this operation is the
file I'm submitting, and it's nonsensical for P4 to check it for
Please click here to see the post in its original format:
More information about the perforce-user