Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...