0

From reading the MKS Integrity manual, I see the following:

  • The Merge From is the revision from which blocks are merged.
  • The Merge Base is the revision you want to use as the base for calculating differences against the Merge From to be applied to the Merge To.
  • The Merge To is the working file, and is used as the basis for the Merge Result file.

What I don't quite understand is, what exactly is the "merge base"? If I have a fresh sandbox, I'm assuming I have the latest of everything in there, so, if I were to merge changes from a branch to this sandbox, why does the MKS merge tool show me a third file (the merge base)? Where does this file come from and why would I possibly care about this - I just want the differences between the file in my sandbox (the merge to) and the file on the branch (the merge from)?

I've turned off the display of it in the merge tool, but, someone obviously thought it important enough to show and to write about in the manual, so I'd like a better understanding of what it is and why I might (or might not) care about it.

Jon
  • 1,675
  • 26
  • 57

1 Answers1

1

From my understanding this is what merge is all about.

So you have a branch created to change code for some reason that you later want to integrate(merge) back to the trunk.

The "split-point" from where the branch was created is used as merge base. This version is then used by the MKS merge tool to find and eventually evaluate the relevant changes.

If you have no newer revisions on the trunk, then the merge base is simply the file from your sandbox (trunk).

But if there are newer revisions on the trunk (meaning you/someone developed also on the trunk) then it is not merging head of trunk with the selected revision of the branch, but looking at the differences within each code-line (branch, trunk) from that merge base.

All this also apply from branch/sub-branch merges.

I must admit that this is (for starters) really a challenging thing and will get even more complicated if you have several merges done before on the same file. Because than the above will change such that the merge base is calculated back to the last merge.

I hope this helps a bit. If not just comment...

VeikkoW
  • 817
  • 7
  • 12
  • So, merge-base is actually a fixed point and not the version "I want" to use for calculating differences. Okay, that makes more sense. I suppose that (evaluating changes on branch & trunk from merge-base) is why it would flag some merged (from branch) changes as being "conflicts", even when it has correctly sorted out the conflicting changes and I just have to save the resulting file? – Jon Jul 29 '14 at 14:25