1

How to apply a label To the latest version of a branch Using config Spec?
Can we apply a label using the Config spec.

Well I have created branches using the Config spec but I applied labels using the apply label option.
But i want to apply it by giving it in the config spec.

Can we do it if so how?

I tried it but Its not working.Thank you in advance

element  *   CHECKEDOUT  
element  /test_ari/karthik/omna.txt  .../karthik_9/LATEST/karthik_66
element  *  /main/LATEST

I want to create a label karthik_66 on karthik_9/LATEST using config spec rules but how do i make it?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
niko
  • 9,285
  • 27
  • 84
  • 131

1 Answers1

1

According to the config spec rules man page, you can use labels within a config spec to select a version, not to label one.
So "no".

When you create/manage a branch, you need 3 rules, not 1 like yo currently have:

element * CHECKEDOUT

# 3 rules here:
element /test_ari/karthik/* .../karthik_9/LATEST
element /test_ari/karthik/* /main/LATEST -mkbranch karthik_9
element /main/0  .../karthik_9/LATEST

element * /main/LATEST

That would create a branch for any file (not just omna.txt) inside /test_ari/karthik, as well for any new file (the /main/0 selection rule).

Since you view would always refers to .../karthik_9/LATEST, you can then apply your label at any time, setting it on the LATEST of karthik_9.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • how do i apply it VOn you did not tell me the Config spec for applying a label you said for a branch – niko Jul 11 '11 at 10:48
  • how to apply a label karthik_66 for karthik_9/LATEST branch using the config spec technique? – niko Jul 11 '11 at 10:48
  • @niko: I was editing my answer: it doesn't seem possible to label *directly* from a config spec. Feel free to discuss it at http://chat.stackoverflow.com/rooms/1204/clearcase – VonC Jul 11 '11 at 10:51
  • so you cannot apply a label using the config spec? – niko Jul 11 '11 at 10:59
  • 1
    @niko: yes, a config spec will be used to select versions or make new branches, but not for applying labels (except the special shifting one which is `LATEST`) – VonC Jul 11 '11 at 11:01