2

I know the filename of a clearcase versioned file. How can i find the latest version of this file on a particular branch ? It should not pick any child branches. Also the parent branch names may not be know always.

Thanks.

Kiran Mohan
  • 2,696
  • 6
  • 36
  • 62
  • 1
    I have added the `cleartool find` option, which should be what you are looking for, especially if you don't always know the parent branches. – VonC Aug 27 '12 at 11:23

1 Answers1

6

If you are using a dynamic view, you can directly access the LATEST version of a given branch by using the extended path:

cat file@@/main/branch/subbranch/LATEST

If you don't know the exact branch path (parent branches) this version is stored in, you can modify your dynamic view and add first the selection rule

element /path/to/file .../subbranch/LATEST

That will select the LATEST version of subbranch within the dynamic view.

Or you can do a cleartool find, in order to see the full extended path for that file:

cleartool find . -name "yourFile" -ver "version(.../subbranch/LATEST)

You will be able to cat (or type in Windows) directly the result (which will be the full extended path)

The diea behind the cat or the cleartool find is to be able to use the syntax .../subbranch/LATEST.
That syntax with the three dots means: '.../subbranch' whatever branches followed by /subbranch.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I am setting the view, as you suggest, and then using the "cleartool ls" to find file version. Thanks for the reply – Kiran Mohan Sep 09 '12 at 09:15