[SOLVED] How do I select the common base file manually for P4Merge?

Issue

This Content is from Stack Overflow. Question asked by mchl12

I am trying to merge a file.

I have the main branch and another branch B that was branched from main.
Both branches have changes. The main branch was merged to B at some point; but the merge on B was undid directly afterwards. After some more changes on both branches I’m trying to merge again but perforce selects the incorrect base file revision from the main branch.

I need to be able to select the common base file manually so that it will do the merge correctly. Unfortunately I was unable to find any way of doing this. If anyone knows how to resolve this, that would be much appreciated.



Solution

If the merge was undone via the p4 undo command, you should be able to redo it with a regular merge operation by setting the dm.integ.undo configurable:

(p4 help undoc)
    dm.integ.undo            0 Enable re-integration of undone changes

With that configurable enabled, the "credit" granted by each integration is considered to be nullified by an "undo" operation, making each previously merged revision eligible for a merge as if it had never been merged previously. (The default behavior is for the undo to be considered the same as an edit, so that it’s combined with unmerged changes, but previously merged changes aren’t re-merged.)

If that’s not an option, the best solution is to use the -f flag. Specify the exact range of changes you want to merge, along with the -f flag, and the revision immediately before that range will be used as the base. E.g.:

p4 integ -f main/...@100,400 B/...

will use main/...@99 as the base for the resolve(s).


This Question was asked in StackOverflow by mchl12 and Answered by Samwise It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?