{"id":1678,"date":"2017-12-05T12:07:06","date_gmt":"2017-12-05T12:07:06","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1678"},"modified":"2025-02-01T22:39:36","modified_gmt":"2025-02-01T22:39:36","slug":"create-a-perforce-branch-bases-on-label","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/create-a-perforce-branch-bases-on-label\/","title":{"rendered":"Create a perforce Branch bases on Label"},"content":{"rendered":"<p><strong>scmuser created the topic: Create a perforce Branch bases on Label<\/strong><br \/>\nHi,<\/p>\n<p>Can you tell me how to create a Perforce Branch based on perforce label?<\/p>\n<p><strong>rajeshkumar replied the topic: Re: Create a perforce Branch bases on Label<\/strong><br \/>\nI found very good explanation on google&#8230;<\/p>\n<p>* Create a branch specification in Perforce. Go to View, Branches, right click and choose New Branch.<br \/>\n* 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.<br \/>\n* Enter the view for the branch, for example \/\/depot\/Rel2a\/&#8230; \/\/depot\/r0.7.20\/&#8230; and click OK. The first part of the view is the source of the branch and the second part is the target location.<br \/>\n* 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.<br \/>\n* Check Limit integration to and enter \/\/depot\/Rel2a\/&#8230;@r0.7.20<br \/>\n* Click on Integrate<\/p>\n<p>Alternatively one can populate the branch (perforce integrating) by entering from the command line:<\/p>\n<p>p4 integrate -b <BranchName> -s \/\/depot\/Rel2a\/&#8230;@<LabelName><\/p>\n<p>If you use the -n flag after integrate then this command just lists the changes without performing any actions.<\/p>\n<p>Finally check in the files. You might need to resolve your files first: use &#8220;p4 resolve&#8221; or right click on the change list in the perforce GUI. You may want to give the following description for the submit:<\/p>\n<p>Created new branch r0.7.20 from \/\/depot\/Rel2a\/&#8230;@r0.7.20<\/p>\n<p>What if you get the following error message upon integrating the files:<\/p>\n<p>\/\/depot\/Rel2a\/&#8230;@r0.7.20 &#8211; no permission for operation on file(s).<\/p>\n<p>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.<\/p>\n<p>One more Way&#8230;.<\/p>\n<p>here\u2019s how you can create a branchspec from a label using the p4 Win client:<\/p>\n<p>* Create a new branchspec<br \/>\n* From the BranchSpec menu -> View BranchSpecs, right click on your new branchspec, and choose \u201cIntegrate Using [branchspec name]\u201c<br \/>\n* In the integration dialog that appears, click the Options button. On the Options tab, check \u201cPermits deletes re-adds\u201d. On the Source Revision Range tab, under \u201cStarting with\u201d check \u201cOther\u201d, select \u201cLabel\u201d and enter the source label\u2019s name, then under \u201cEnding with\u201d check \u201cOther\u201d, select \u201cLabel\u201d and again enter the source label\u2019s name<br \/>\n* Click OK to close the integration dialog<br \/>\n* Click OK on the main integration dialog to perform the integration<\/p>\n<p>DONT FORGOT TO DO SUBMIT OPERATION<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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:&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[370],"tags":[373],"class_list":["post-1678","post","type-post","status-publish","format-standard","hentry","category-perforce","tag-perforce"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=1678"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1678\/revisions"}],"predecessor-version":[{"id":1679,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1678\/revisions\/1679"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=1678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=1678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=1678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}