How to rename branch specification in perforce?

I would like to know how to rename the specification of a branch (aka, "display branches") in perforce. The P4V client does not allow editing the specification name of a branch.

Is it possible to simply add another branch specification, copy the settings and delete the old one?

+6
perforce perforce-branch-spec
source share
4 answers

Perforce does not provide a mechanism for renaming a branch specification. Perhaps they fear that you might accidentally break some scripts if you go over and rename one?

Yes, it’s safe to create a new one, copy the settings from the old one and delete it (provided that nothing depends on the specification of the branch with this old name, of course).

+8
source share

The absence of renaming of industry specifications applies to all specifications (users, groups, customers, labels, tasks, etc.). The command line command may be useful here:

p4 branch -o OLDBRANCH | sed -e "s,OLDBRANCH,NEWBRANCH," | p4 branch -i && p4 branch -d OLDBRANCH 
+2
source share

Check out this link:

http://kb.perforce.com/article/24/renaming-depot-directories

The procedure depends on the version of your server. For example, on 2009+ servers, you use pedit and pmove to rename and save file history.

0
source share

Yes. But you need to do p4 integration to get the files. This is what p4v does "copy or rename." Use the rename option, which also deletes old files.

-one
source share

All Articles