About merging files and directories in base VersionVault

A merge combines the contents of two or more files or directories into a single new file or directory. The HCL VersionVault merge algorithm uses the following files during a merge:

  • Contributors, which are typically one version from each branch you are merging. (You can merge up to 15 contributors.) You specify which versions are contributors.
  • The base contributor, which is typically the closest common ancestor of the contributors. (For selective merges, subtractive merges, and merges in an environment with complex branch structures, the base contributor may not be the closest common ancestor.) The merge algorithm determines which contributor is the base contributor.
  • The target contributor, which is typically the latest version on the branch that will contain the results of the merge. You determine which version is the target contributor.
  • The merge output file or directory, which contains the results of the merge and is usually checked in as a successor to the target contributor. By default, the merge output file is the checked-out version of the target contributor, but you can choose a different file to contain the merge output.

The version tree for the element opt.c consists of the main branch, on which are versions 4 through 8; and the r1_fix branch, on which are versions 0 through 6. Version 4 on main is the base contributor, version 6 on the r1_fix branch is a contributor, and version 8 on the main branch is the target contributor, which has a checkout labeled as the Merge output file. A merge arrow points from version 4 to the checkout.