Kiran Mohan
Kiran Mohan

Reputation: 2996

clearcase latest version of a file on a particular branch

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.

Upvotes: 2

Views: 6875

Answers (1)

VonC
VonC

Reputation: 1323553

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.

Upvotes: 6

Related Questions