It would be wrong to query for a specific version like "LATEST
" for files in a branch, because there is no guaranty your config spec actually select the LATEST of a given branch.
The correct way is to cleartool find
elements:
- in the current view (
cview
) - which have a version in that branch (
brtype
)
That means:
cd /path/to/your/view/yourVob
cleartool find . -cview -type f -ele "brtype(Branch2)" -print
That would still give you File1
, but that would give it as the version in /main
only (not Branch2
)
You can then filter out easily what you need:
cleartool find . -cview -type f -ele "brtype(Branch2)" -print | grep Branch2
It is still one command, and it doesn't assume you are selecting the LATEST
of Branch2
.
If you are selecting any version on Branch2
, it will be in the result of that find.