Create a perforce Branch bases on Label

scmuser created the topic: Create a perforce Branch bases on Label

Can you tell me how to create a Perforce Branch based on perforce label?

rajeshkumar replied the topic: Re: Create a perforce Branch bases on Label
I found very good explanation on google…

* Create a branch specification in Perforce. Go to View, Branches, right click and choose New Branch.
* Enter a name for the branch specification. If the release 2a needs to be branched from label r0.7.20 then a suitable name would be Rel2a_r0.7.20.
* Enter the view for the branch, for example //depot/Rel2a/… //depot/r0.7.20/… and click OK. The first part of the view is the source of the branch and the second part is the target location.
* Now create the files in the branch by using the Perforce integrate command. Right click on the branch specification and choose Integrate using branch Rel2a_r0.7.20.
* Check Limit integration to and enter //depot/Rel2a/…@r0.7.20
* Click on Integrate

Alternatively one can populate the branch (perforce integrating) by entering from the command line:

p4 integrate -b -s //depot/Rel2a/…@

If you use the -n flag after integrate then this command just lists the changes without performing any actions.

Finally check in the files. You might need to resolve your files first: use “p4 resolve” or right click on the change list in the perforce GUI. You may want to give the following description for the submit:

Created new branch r0.7.20 from //depot/Rel2a/…@r0.7.20

What if you get the following error message upon integrating the files:

//depot/Rel2a/…@r0.7.20 – no permission for operation on file(s).

This error can have several causes: check permissions (p4 protect) and make sure that (the future location of) the target files are in your workspace definition.

One more Way….

here’s how you can create a branchspec from a label using the p4 Win client:

* Create a new branchspec
* From the BranchSpec menu -> View BranchSpecs, right click on your new branchspec, and choose “Integrate Using [branchspec name]“
* In the integration dialog that appears, click the Options button. On the Options tab, check “Permits deletes re-adds”. On the Source Revision Range tab, under “Starting with” check “Other”, select “Label” and enter the source label’s name, then under “Ending with” check “Other”, select “Label” and again enter the source label’s name
* Click OK to close the integration dialog
* Click OK on the main integration dialog to perform the integration

Rajesh Kumar
Twitt me @