So I'm writing a script at work where I have to go through all the projects in a ClearCase vob, look for a file and parse some info from said file.
Naturally, I wouldn't want to load every single project so I'm using cleartool to retrieve the unloaded files.
First, I'm using the find command to locate the files. This was my first attempt:
root>cleartool find C:/viewpath -name file.txt -version "lbtype(Version-label)" -print -nr
Viewpath is the path to the project where I'm currently looking for the file. The file I'm looking for is file.txt
on the version specified by Version-label.
This gave me no result whatsoever, even though I knew file.txt
existed on that version.
I figured out it was looking through an old version of the directory, the latest on the main-branch, which was before file.txt
was added to the directory. I tried this instead:
root>cleartool find C:/viewpath@@/Version-label -name file.txt -version "lbtype(Version-label)" -print -nr
And got this result, which was what I was looking for
C:/viewpath\file.txt@@\main\branch\41
So now that I knew where I could find the file I tried to get it.
root>cleartool get -to savepath C:/viewpath\file.txt@@\main\branch\41
Which gave me this result
cleartool: Error: "C:/viewpath\file.txt@@\main\branch\41" does not exist, or is not a ClearCase version, or is a checked out version which was removed.
Also tried
root>cleartool get -to savepath C:/viewpath\file.txt@@/Version-label
With the same result
I can get files added to the directory when it was still on the main-branch, so it is still searching through the directory on the main-branch, where file.txt
is nowhere to be found.
How do I tell it to look through a version of the directory from after it was branched from main?