I needed to merge two branches without a common ancestor using Perforce Visual Client (P4V) 2015.2 but for my surprise the “-i” flag for p4 integrate has been removed. This flag is used to do indirect integrations. Indirect integration is when two branches are not directly related to each other like in the following example:
Merging Y to Z is trivial because the two branches are directly related. However, going from X to Z is an indirect integration.
p4 integrate for release 2004.2 and later always considers (no need for “-i”) indirect integrations through intermediate branches when determining that files are related and what changes need to be integrated and I think that is the reason why the flag has been removed from P4V.
The problem happens when you need to do a baseless merge when the two branches are not related at all. In this case, you can’t use P4V and you will need to run the command with the “-i” flag.
Luckily, this has been fixed in version 2012.1 of Perforce and p4 integrate will now automatically schedule baseless merges to be performed with an empty base file. The “-i” flag is still accepted but has been deprecated.
I thought it was worth to write about it as there might be other people using an old version of Perforce.
For more information: http://answers.perforce.com/articles/KB/3394