Use of p4 duplicate command | P4 Command Guide

p4-duplicate-command

Use of p4 duplicate command

Problem Area is –
Is there any possibility to rename branch name? as directory rename is possible?

Solution is – p4 duplicate command

What the command ‘p4 duplicate’ was implement to do was create a duplicated revision of a folder as if it always existed. This is explained in the ‘p4 help duplicate’, I have copied below:

Duplicate revisions as if they always existed.  All aspects of
   the source revisions are mirrored into the target revisions,
   including changelist number, date, attributes, and contents.
   The target revision must not already exist, and the target file
must not be opened (for any operation) on any client.

Integration records are duplicated as well.

To rename branch names is possible with the process of a deep rename operation.

p4 duplicate //depot/Jam/MAINds/… //depot/Jam/MAIN/…

The above command will create an exact copy of the branch you’re duplicating including its integration history.

Then the duplication source is not wanted anymore, so you will need to use the obliterate command:

p4 obliterate -y //depot/Jam/MAINds/…

You can find more information about “p4 duplicate” by running the “p4 help duplicate” command.

If you have any further questions please let me know.

Reference –

Perforce Support and

http://maillist.perforce.com/pipermail/perforce-user/2010-November/027364.html

Tagged : / / / / / / / / / / / / / /