Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the description of a existing changelist in command line?

Tags:

perforce

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?

like image 644
MQ Gu Avatar asked Apr 12 '11 10:04

MQ Gu


People also ask

What does p4 change do?

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.

How do I undo a 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.

What is p4 describe?

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.

How do I move files from one Changelist to another?

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 .


Video Answer


3 Answers

This command line worked for me:

p4 --field Description="New CL description here" change -o *changelist_number* | p4 change -i
like image 89
Gene Walters Avatar answered Oct 19 '22 12:10

Gene Walters


Use the following command:

p4 change -u CL_number

For details, please visit this page.

like image 22
nafser33 Avatar answered Oct 19 '22 10:10

nafser33


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

like image 9
ChrisF Avatar answered Oct 19 '22 11:10

ChrisF