1
element * CHECKEDOUT
element  /test_ari/karthik/...  ... /karthik_omna/LATEST
element  /test_ari/karthik/...  /main/2  -mkbranch karthik_omna
element *  /main/LATEST 

I have written the above code and it worked so right.I am so happy for that.But i want to clear somethings from u guys. What does that 3 dots mean in this syntax

 /test_ari/karthik/... 

and the other 3 dots means

 ... /karthik_omna/LATEST

And last question but it got great importance. Why should we always use * CHECKEDOUT in the beginning? what happens if we dont use it?

Balanivash
  • 6,709
  • 9
  • 32
  • 48
cody
  • 85
  • 3
  • 6

1 Answers1

1
/test_ari/karthik/... 

It means that the selection rule which follows (i.e .../karthik_omna/LATEST) will apply to the karthik directory, and to all the subdirectories and files, recursively.
If the selection path had been /test_ari/karthik/* (star instead of three dots), the selection rule would have applied to the subdirectories and files, but not to the karthik directory itself


.../karthik_omna/LATEST

This is a selection rule instructing ClearCase to select the LATEST version of the branch karthik_omna, without worrying on top of what other branch karthik_omna has been created.
If the selection rule had been (for example) /main/karthik_omna/LATEST, it would have selected the LATEST version of that branch only if said branch was created on top of 'main'.
Contrary to the previous '...', there is no '*' for a selection rule.
(*/karthik_omna/LATEST doesn't exist)


As I explained in "How to create a branch", selection rules are read in order and the first one that fits make ClearCase apply it (and ignore the others) for a particular file or directory.

This is why you will always find:

element * CHECKEDOUT

as the first rule, because when you notify ClearCase of your intention to modify that file, it (the file) acquires a special version called CHECKEDOUT which needs to be selected in order for you to be able to modify and then check-in that file.
If that rule was too far down below, ClearCase might select another version, and you wouldn't be able to check-in anything since that file would not be considered checked-out in your view.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • thank you von c you made me clear completely but did not understand these syntax /test_ari/karthik/* u mean it does not apply to the files of karthik directory but to the files of its sub directories right? /test_ari/karthik... and these applies to the files of karthik directory too right? – cody Jul 06 '11 at 06:26
  • @cody: yes, that is correct. With a '*', the directory alone `karthik` will have to be selected by some other rules below. – VonC Jul 06 '11 at 07:12