3

I would like to create a label from anywhere by explicitly specifying the VOB name. Unfortunately no matter how I specify my VOB I always get this error:

$ cleartool mklbtype -global -nc MyVOBName:MY_LABEL_NAME
cleartool: Error: Invalid name: "MyVOBName:MY_LABEL_NAME".
cleartool: Error: Unable to create label type "MyVOBName:MY_LABEL_NAME".

Or even:

$ cleartool mklbtype -global -nc -vob MyVOBName MY_LABEL_NAME
cleartool: Error: Unrecognized option "-vob"
Usage: mklbtype [-replace] [-global [-acquire] | -ordinary] [-pbranch] [-shared]
                [-c comment | -cfile pname | -cq | -cqe | -nc]
                label-type-selector ...

The only thing that works is going directly in the correct VOB with cd L:\MyVOBnane.

Any clues?

nowox
  • 25,978
  • 39
  • 143
  • 293

1 Answers1

2

It should

cd /path/to/your/vob
cleartool mklbtype -global -nc MY_LABEL_NAME

I don't see a -vob option in cleartool mklbtype (and anyway it should be with -vob \MyVOBName, not -vob MyVOBName: you must use the vob tag \MyVobName).

You can use:

cleartool mklbtype -global -nc lbtype:MyLabel@\MyVobName

That last one can be executed from anywhere.

Creating the lbtype globally is useful to share it amongst Vob: see "Sharing branches and labels between 2 VoB Clearcase".


Note that it creates a label type, it doesn't label.
For that, you need to go into a view and type (using cleartool mklabel):

cleartool mklabel -rec -nc MyLabel .

See another example at "What is the difference between clearcase and vss in label a release?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Why I don't have the `-vob` option? Is it a new option to CC? – nowox Sep 18 '14 at 13:17
  • @coin there is no '`-vob`' option. I have edited the answer accordingly and added a link to the documentation. – VonC Sep 18 '14 at 13:18
  • Unfortunately this not work I get: `cleartool: Error: Unable to determine VOB for pathname "MyVobName".` when I use `ct mklbtype -nc lbtype:MyLabel@\MyVobName` – nowox Sep 18 '14 at 13:38
  • @coin do you see `\MyVobName` when you type `cleartool lsvob`? – VonC Sep 18 '14 at 13:39
  • Yes I do see it but I can also read `* \MyVobName \\server\clearcase\vost64\MyVobName.vbs public (replicated)` – nowox Sep 18 '14 at 13:44
  • @coin then it will work, as it follows the `[lbtype:]type-name[@vob-selector]` convention described in the doc. – VonC Sep 18 '14 at 13:47