What Is the Root Branch Type?
Question in the context of
ClearCase, and more precisely of a
branch off the root recommendation.
This may sound like an arcane detail question, of no interest other than obfuscation.
Version trees in
ClearCase all share the same topology, with one unique
root branch (or
trunk).
The type of this branch is by default
main, but for orthogonality reasons, nothing prevent one from either:
- renaming the
main brtype to something else, or
-
chtype 'ing the main branches of some elements to other brtypes
This will have the effect of (partially or totally) hiding the contents of vobs to views not selecting the correct branches.
Note however that
mkelem is hardcoded to create new elements with a root of the initial type, whatever its name.
How can one then find the current name of this type?
- One can create a new element, but this may not always be an option.
- One can check the
OID of the existing branch types, and compare them to the (last part of the) uuid of the vob (no guarantee, though):
> for v in $(ct lsvob -s); do u=$(ct des -fmt '%On' vob:$v|perl -ne 's/^[^.]+?\.[^.]+?\.//;print'); echo $v: $(ct lstype -kind brtype -fmt "%On %n\n" -invob $v | grep $u); done
/vob/buildtools: 0e81d74b.7f5411d8.900d.00:01:80:e6:b1:a0 main
/vob/playground: 2ac0c0e3.134711d6.bbf6.00:01:80:b2:73:b3 main
/vob/tools_src: b2e79af5.a05c11d4.a079.00:01:80:88:5f:4a main
/vob/platform: 0a2d816c.cf2511d6.84c7.00:01:83:08:b4:dc main
/vob/common: 3ea33e30.050911d1.abe3.00:01:80:82:59:f0 main
/vob/gen3_naming: 4bf66b39.ed0f11ce.a20a.08:00:2b:92:75:ed main
/vob/tools_Admin: 3accc934.a59d11d7.814d.00:01:83:08:b4:dc main
--
MarcGirod - 03 Oct 2007