We are using clearcase as our SCM. I have not much experience with clearcase. Now we are about to release our code to production. I want to label my code as I have done usin
a lbtype is a template, a declaration.
a label is the instance that will be put on each versions needed to be labeled.
See mklbtype
The
mklbtype
command creates one or more label types with the specified names for future use within a VOB.
After creating a label type in a VOB, you can attach labels of that type to versions of that VOB's elements, usingmklabel
.
You also can attach a constraint on a lbtype
:
By default, a new label type is constrained to use on only one version in an element's entire version tree.
This allows you to omit the branch path name portion of a version-extended path name (for example,foo.c@@/JOHN_TMP
)
Once you have define a lbtype
, you can apply (mklabel) it to any file or group of files you want in your current view.
That means you have a view configured to select the LATEST
of a branch, and at a given time, you apply this label:
cd /myView/myVob/myGroupOfFile
cleartool mklabel -nc -r MY_LABEL-1.0 .
Note: the name of the lbtype
(and the labels set from this lbtype
) is entirely up to you. You can set a label FOO
, BAR
or any other names. Conversely, you can set a label MY_LABEL-2.0
, then set a label MY_LABEL-1.2
(not wise, but...).
If you want to see what exact versions are referenced by a previous existing label like MY_LABEL-1.0
, you create another (dynamic) view that you set to see this label.
The following config spec ("configuration specifications", aka "selection rules" for versions) will achieve just that:
element * MY_LABEL-1.0
element * /main/LATEST
The second selection rule is called "stop rule" because it allows for all versions to "fall back" to this default rule: if no version (for a given file) is labeled MY_LABEL-1.0
, then it will always stop at the "/main/LATEST
" rule, to select the LATEST
version of the branch main
.
For those "consultation" view (i.e. "view that are only used to see versions of files"), I recommend dynamic view, for a quick access to those fixed versions. If you now want to see the 2.0 label, simply modify the config spec of this view. Or create another view, in order to see both 1.0 (in the first view) and 2.0 (in this second new view)