16.8 Merging Ongoing Development Work

After Baseline 1 is created, the MAJ team merges the Baseline 1 changes into its work (Figure 53). The team now has access to the minor enhancements it needs for further development. Team members also have an early opportunity to determine whether any of their changes are incompatible.

Figure 53 Updating Major Enhancements Development

Accordingly, the project manager declares a freeze of major enhancements development. MAJ team members check in all elements and verify that the monet application builds and runs, making small source changes as necessary. When all such changes have been checked in, the team has a consistent set of \main\major\LATEST versions.

NOTE: Developers working on other major enhancements branches can merge at other times, using the same merge procedures described here.

Preparing to Merge

  1. The project manager makes sure that no element is checked out on the major branch:

  2. Z:\> cleartool lscheckout -all \monet \libpub

    NOTE: Any MAJ team members who want to continue with nonmerge work can create a subbranch at the "frozen" version (or work with a version that is checked out as unreserved).

  3. The project manager performs any required directory merges:

  4. Z:\> net use y: \\view\major_vu (use any MAJ team view)
    Z:\> y:
    Y:\> cleartool findmerge \monet \libpub -type d -fversion \main\LATEST -merge
    Needs merge \monet\src [automatic to \main\major\3 from \main\LATEST]
    .
    . <lots of output>
    .
    Log has been written to "findmerge.log.04-Feb-99.09:58:25".

  5. After checking in the files, the project manager determines which elements need to be merged:

  6. Y:\> cleartool findmerge \monet \libpub -fversion \main\LATEST -print
    .
    . <lots of output>
    .
    A 'findmerge' log has been written to
    "findmerge.log.04-Feb-99.10.01.23"

    This last findmerge log file is in the form of a batch file: it contains a series of cleartool findmerge commands, each of which performs the required merge for one element:

Y:\> type findmerge.log.04-Feb-99.10.01.23
cleartool findmerge \monet\src\opt.c@@\main\major\1 -fver \main\LATEST -merge
cleartool findmerge \monet\src\prs.c@@\main\major\3 -fver \main\LATEST -merge
.
.
cleartool findmerge \libpub\src\dcanon.c@@\main\major\3 -fver \main\LATEST -merge
cleartool findmerge \libpub\src\getcwd.c@@\main\major\2 -fver \main\LATEST -merge
cleartool findmerge \libpub\src\lineseq.c@@\main\major\10 -fver \main\LATEST -merge

  1. The project manager locks the major branch, allowing it to be used only by the developers who are performing the merges:

  2. cleartool lock -nusers meister,arb,david,sakai ^
    brtype:major@\monet brtype:major@\libpub

    Locked branch type "major".
    Locked branch type "major".

Merging Work

Because the MAJ team is not contributing to a baseline soon, it is not necessary to merge work (and test the results) in a shared view. MAJ developers can continue working in their own views.

Periodically, the project manager sends an excerpt from the findmerge log to an individual developer, who executes the commands and monitors the results. (The developer can send the resulting log files back to the project manager, as confirmation of the merge activity.)

A merged version of an element includes changes from three development efforts: Release 1.0 bug fixing, minor enhancements, and new features (Figure 54).

Figure 54 Merging Baseline 1 Changes into the major Branch

The project manager verifies that no more merges are needed, by entering a findmerge command with the -whynot option:

Y:\> cleartool findmerge \monet \libpub -fversion \main\LATEST -whynot -print
.
.
No merge "\monet\src" [\main\major\4 already merged from \main\3]
No merge "\monet\src\opt.c" [\main\major\2 already merged from \main\12]
.
.

The merge period ends when the project manager removes the lock on the major branch:

Y:\> cleartool unlock brtype:major@\monet brtype:major@\libpub
Unlocked branch type "major".
Unlocked branch type "major".