vspacer
 
vspacer
 

ClearCase Commands : Branches

 

 
35. To list existing branches.

cl lstype -brtype




36. To Make a branch.

#1 cl mkbrtype Eagle
and enter appropriate comments (doesn't matter where in the tree you are).

#2 mklbtype Eaglebase and enter appropriate comments.

#3 Be in the top level (/src) directory.
mklabel -recurse Eaglebase .
to apply the label throughout the tree.
Wait a long time.

#4 Change your configspecTip #43 to use the branch.
Note that if you use the graphical (xlsvtree) viewer to look at a file at this point, the new branch will not show up. No, you didn't do anything wrong. The new branch will not be created until you check the file out.




37. To merge a branch back to the mainline.

Finally, a chance to screw up bigtime!

#1 Look at your configspec (Tip 42) to ensure that your view is currently set to the main line.

#2 Change the directory to the root of the source tree.

#3 Label the entire source tree (Tip #17) PRE_WHATEVER_MERGE so that if you screw up big time it'll be easier for people to check out the files existing before the screw up.

#4 cl findmerge . -fver /main/BRANCH_NAME -merge -xmerge

This command will, for all the files on the branch:

*present side-by-side Mainline-Branch-FinalMerged windows for all non-trivial merges back to the mainline.
*Check out the file, and put the contents of the FinalMerged window in it.
*Create a matching file.contrib file.

We're not going to try and verify the merge here and now. Click 'y' to accept the generated merge files, until all the files are processed.

#5 In the root directory you will find a FILExxxx log, listing all the files merged. Print it.

#6 Using the log printout as a control:

*Use xlsvtree or something equivalent to diff the checked out file against the predecessor file on the main-line.
*Verify the merged file is the way you want it and edit it if not.
*Build the app to verify the changes are (syntactically) valid.
*Regression testing the app would be nice.
*Checkin the verified files to the mainline.
*- rm the file.contrib files. Try not to rm the file object by mistake.

#7 Note! There is no such thing as a valid merged .dlg file!

Bring up the latest mainline and latest branch .dlg files in a resource editor and hand tool the changes!

Download

ClearCase Commands (116KB)

   


Back to top | ZDS Home | This article updated January 14, 2004.