Wednesday, December 17, 2008

File Merge Algorithm

File Merge Algorithm
 
A merge combines the contents of two or more versions into a single new version. Before know how the merge works, we need know below terms:
 
  • The source contributors: one version from your development stream and one version from the target stream.
  • The base contributors: the common ancestor of the source versions.
  • The destination version: the merge output, which in a deliver operation becomes a new version in the target stream and in a rebase operation becomes a new version in the development stream
How files and directory are merged
To merge files and directories:
  1. The base contributor is identified.
  2. Each contributor is compared with the base contributor using the Rational ClearCase merge algorithm.
  3. For any line that is unchanged between the base contributor and any other contributor, the line is copied to the merge output file.
  4. For any line that has changed between the base contributor and one other contributor, the change in the contributor is accepted. Depending on how you started the merge operation, the change may be copied to the merge output file. However, you can disable the automated merge capability for any merge operation. If you disable the capability, you must approve each change to the merge output file.
  5. For any line that has changed between the base contributor and more than one other contributor, you are required to resolve the conflicting difference manually.

No comments: