Merging a new release of an entire source tree

Your team has been using an externally supplied source-code product, maintaining the sources in a VOB. The successive versions supplied by the vendor are checked in to the main branch and labeled VEND_R1, VEND_R2, and VEND_R3. Your team’s fixes and enhancements are created on subbranch enhance. The views in which your team works have the following configuration to branch from the VEND_R3 baseline:

element * CHECKEDOUT
element * .../enhance/LATEST
element * VEND_R3 -mkbranch enhance
element * /main/LATEST -mkbranch enhance

The version trees in the following figure show the following various likely cases:

  • An element that your team started changing at Release 1 (enhance branch created at the version labeled VEND_R1)
  • An element that your team started changing at Release 3
  • An element that your team has never changed
Figure 1. Merging a new release of an entire source tree

The version trees of two unnamed elements are shown with two branches, main and enhance.

When Release 4 arrives, and you need to integrate this release with your team’s changes.

To prepare for the merge, add the new release to the main branch and label the versions VEND_R4. Merging the source trees involves merging from the version labeled VEND_R4 to the most recent version on the enhance branch; if an element has no enhance branch, nothing is merged.

This procedure accomplishes the following integration:
  1. Load the vendor’s Release 4 media into a standard directory tree:
    cd /usr/tmp
    tar –xv

    The directory tree created is mathlib_4.0.

  2. As the VOB owner, run clearfsimport in a view configured with the default config spec to create Release 4 versions on the main branches of elements (and create new elements as needed).
    clearfsimport –recurse /usr/tmp/mathlib_4.0 /vobs/proj/mathlib
  3. Label the new versions:
    cleartool mklbtype -c "Release 4 of MathLib sources" VEND_R4
    
    Created label type "VEND_R4".
    cleartool mklabel -recurse VEND_R4 /vobs/proj/mathlib
    
     . (lots of output)
     .
  4. Set to a view that is configured with your team’s config spec and selects the versions on the enhance branch:
    cleartool setview enh_vu
  5. Merge from the VEND_R4 configuration to your view:
    cleartool findmerge -nback /vobs/proj/mathlib –fver VEND_R4 –merge \
    –graphical

    The –merge –graphical syntax instructs findmerge to merge automatically if possible, but if not, start the graphical merge tool.

  6. Verify the merges, and check in the modified elements.
You have now established Release 4 as the new baseline. Developers on your team can update their view configurations.
element * CHECKEDOUT

element * .../enhance/LATEST

element * VEND_R4 –mkbranch enhance

element * /main/LATEST –mkbranch enhance

(change from VEND_R3 to VEND_R4)

Elements that have been active continue to evolve on their enhance branches. When elements are revised for the first time, their enhance branches are created at the VEND_R4 version.