Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Create a perforce Branch bases on Label

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

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

DONT FORGOT TO DO SUBMIT OPERATION
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x