Reputation: 81
I would like to know if there is a way to use p4 Submit with comments contained in a comment file. i.e p4 Submit "Comment File.txt" fileName
Thanks
Upvotes: 3
Views: 887
Reputation: 18135
You can load the contents of the comment file into an environment variable and then pass that to the submit
command.
set /p p4description=<"Comment File.txt"
p4 submit -d "%p4description%"
::you can then get rid of that environment variable...
set p4description=
Upvotes: 1
Reputation: 20838
You can use the -i
option to read the changelist spec (including the comment) from a file or stdin. Something like
mumblemumble.pl > changelistspec.txt
p4 submit -i < changelistspec.txt
The format of the changlelistspec.txt is the same as the file that pops up when you run p4 submit
interactively. Use
p4 submit -d
to view the changelistspec. Your script or whatever needs to output in that format.
Upvotes: 2