Clearcase: move a child branch to the main branch

In a box, I started working on a branch named main/release4/release5

. After I started my work, release 4 was merged into the main one. My staff started on major / release 5. Is there a way to move my work main/release4/release5

to main/release5

?

So far I've tried to merge with main/release4/release5

in main/release5

, but it didn't work. The files remained on main/release4/release5

.

A good example of how it looks in the version tree:

main
|   \
|     release 4
|     /      \ 
main        release 5
    \              \
    release 5      *move files from here
         \ 
         *to here

      

Here is the original configuration I worked with.

element * CHECKEDOUT
element - directory * /main/LATEST
element * /main/release4/release5/LATEST
element * /main/release4/LATEST -mkbranch release5
element * /main/LATEST -mkbranch release4

      

Here is the configuration my colleagues started with after merging release 4 into mainline

element * CHECKEDOUT
element - directory * /main/LATEST
element * main/release5/LATEST
element * main/LATEST -mkbranch release5

      

+1


source to share


1 answer


The idea behind those selection rules ending in branchname/LATEST -mkbranch newBranch

is to allow an item (file or directory) to start a new branch from whatever version is the latest, unless there are versions on the specified one newbranch

.

Thus, it is a file mechanism.

To have all files start with release4 merged into main, put a label on all items main/LATEST

immediately after that merge (preferably using the snapshot view used for the specified merge), then use a config spec like:

element * CHECKEDOUT
element * .../release5/LATEST
element * REL4 -mkbranch release5
element * main/LATEST -mkbranch release5

      

Starting a branch from a fixed tag is safer than starting from /main/LATEST

(which can see the new version at any time)




OP Gregory Peck's comments :

using .../release5/LATEST

fixed it!

The reason the "three dot" syntax worked (as shown in " flush the latest version of a file on a specific branch ) is because some versions had their branches starting from a branch release4

, the other from main

.

With, .../release5/LATEST

you pick LATEST

from release5

, no matter which branch release5

starts with.

+1


source







All Articles