Colonel Panic
Colonel Panic

Reputation: 137594

How to reconcile and add files to new changelist?

Perforce has a command p4 reconcile. It adds files to the 'default changelist', or if I use the -c flag, the particular changelist whose number I give. How can I run the reconcile command but add the files to a new changelist?

Upvotes: 2

Views: 2647

Answers (1)

Bryan Pendleton
Bryan Pendleton

Reputation: 16359

First, create the new changelist:

p4 change -o | sed 's/<enter.*>/My Changelist/' | p4 change -i
Change 5 created.

(Depending on your operating system, you may have to do something slightly different to provide a changelist description for your changelist; I used the Unix 'sed' utility in this case.)

Then, specify that changelist to reconcile:

p4 reconcile -c 5

Alternatively, you could let reconcile add the files to the default changelist, then subsequently use 'p4 reopen' to move the files to the changelist you prefer, after you have created it and received its changelist number:

p4 reopen -c 5 //...

Upvotes: 1

Related Questions