First you need a dynamic view:
So you define a dynamic view for updating Branch1
(ie with a selection rule ending with -mkbranch Branch1
: see "How to create a branch" for the three selection rules you need).
Then you need to find each relevant versions for L1
and copy them on top of your current view, putting a different label on that new version in Branch1
(create a L1B1
lbtype first, for instance):
Windows syntax:
cleartool find . -ver "lbtype(LBL1)" \
-exec "cleartool co -c \"LBL1 import\" \"%CLEARCASE_PN%\" ; \
cp \"%CLEARCASE_XPN%\" \"%CLEARCASE_PN%\" ; \
cleartool ci -nc \"%CLEARCASE_PN%\" ; \
cleartool mklabel –replace L1B1 \"%CLEARCASE_PN%\""
(in one line: cleartool find . -ver "lbtype(LBL1)" -exec "cleartool co -c \"LBL1 import\" \"%CLEARCASE_PN%\" ; cp \"%CLEARCASE_XPN%\" \"%CLEARCASE_PN%\" ; cleartool ci -nc \"%CLEARCASE_PN%\" ; cleartool mklabel –replace L1B1 \"%CLEARCASE_PN%\""
)
Unix syntax:
cleartool find . -ver "lbtype(LBL1)" \
-exec "cleartool co -c \"LBL1 import\" \"$CLEARCASE_PN\" ; \
cp \"$CLEARCASE_XPN\" \"$CLEARCASE_PN\" ; \
cleartool ci -nc \"$CLEARCASE_PN\"; \
cleartool mklabel –replace L1B1 \"$CLEARCASE_PN\""
(one line: cleartool find . -ver "lbtype(LBL1)" -exec "cleartool co -c \"LBL1 import\" \"$CLEARCASE_PN\" ; cp \"$CLEARCASE_XPN\" \"$CLEARCASE_PN\" ; cleartool ci -nc \"$CLEARCASE_PN\"; cleartool mklabel –replace L1B1 \"$CLEARCASE_PN\""
)
CLEARCASE_XPN
reference the full extended pathname, accessible from a dynamic view, CLEARCASE_PN
references the path without the extended path, ie without the part after the @@
.
There are environment variables set by the cleartool find
command, hence the %...%
or $
used.
Repeat that for L2
and L3
, and you will get, for a given file:
x - y (L1B1) - y (L2B1) - y (L3B1) [Branch-1: Stable Branch (only one node)]
\
x - x - x (L1) - x - x(L2) - x (L3) - x - x