The command "p4 change" prompts a editor and needs a form. But I want to do this in command line.
How can I achieve this?
p4 change brings up a form for editing or viewing in the editor defined by the environment variable P4EDITOR . When no arguments are provided, this command creates a numbered changelist. All files open in the default changelist are moved to the numbered changelist.
Use p4 revert to discard changes made to open files, reverting them to the revisions last synced from the depot (with p4 sync ). This command also removes the reverted files from the pending changelists with which they're associated. An administrator can use the -C option to revert another user's open files.
p4 describe displays the details of one or more changelists. For each changelist, the output includes the changelist number, the changelist creator, the client workspace name, the date the changelist was created, and the changelist description. This command also works with openable stream specifications.
To move files from one changelist to another, issue the p4 reopen -c changenumfilenames command, where changenum specifies the number of the target changelist. If you are moving files to the default changelist, use p4 reopen -c default filenames .
This command line worked for me:
p4 --field Description="New CL description here" change -o *changelist_number* | p4 change -i
Use the following command:
p4 change -u CL_number
For details, please visit this page.
There's always the -i
command:
Read a changelist description from standard input. Input must be in the same format used by the p4 change form.
As Bryan points out in his comment the best approach is probably to run change -o
, redirect the output to a file, process the file with other shell commands, and then send that file back to the server with change -i
.
Source
But you can always change the description when you submit:
p4 submit -d "description"
This only works on the default change list.
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With