Perforce Public Knowledge Base - Using 'p4 integrate -Rs'
Reset Search
 

 

Article

Using 'p4 integrate -Rs'

« Go Back

Information

 
Problem

Using p4 integ -Rs  can improve merge results by not revisiting previously integrated content during the resolve process. The p4 integ -Rs flag modifies the way resolves are scheduled by skipping previously integrated ("cherry-picked") revisions. Multiple resolves per file are scheduled whenever avoiding previously integrated content.

The -Rs flag is available in 2011.1+ version Perforce Servers when the dm.integ.engine configurable is set to 3. For more information on integration engine defaults, see KB article Changing the Default Integration Engine.

Solution

Below is an example of using p4 integ -Rs.

Example

  1. Add a file to main.
  2. Branch it to rel1.
  3. Make three edits to the file in main.
  4. Cherry-pick the second edit, rev#3, from main to rel1.
  5. Integrate remaining edits from main to rel1.

Integ WITHOUT -Rs

Without the -Rs flag, notice there is only one resolve scheduled -- and the revision range includes previously integrated content (revision #3):

$ p4 integ //depot/main/baz //depot/rel1/baz
//depot/rel1/baz#2 - integrate from //depot/main/baz#2,#4

$ p4 resolve -n //...
/client11.1/depot/rel1/baz - merging //depot/main/baz#2,#4

Integ WITH -Rs

With the -Rs flag, notice there are separate resolves for the unintegrated revisions -- and the previously integrated revision (#3) is avoided.

$ p4 integ -Rs //depot/main/baz //depot/rel1/baz
//depot/rel1/baz - integrate from //depot/main/baz#2
//depot/rel1/baz#2 - integrate from //depot/main/baz#4

$ p4 resolve -n //...
/client11.1/depot/rel1/baz - merging //depot/main/baz#2
/client11.1/depot/rel1/baz - merging //depot/main/baz#4

In other words, content from previously integrated ("cherry-picked") revisions is not re-merged when using the -Rs flag.

Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255