I would like to get all the files checked-in a private branch and only the those files checked in.
What config spec would you recommend?
Let's say prvt
is the private branch:
element * .../prvt/LATEST
Wo开发者_如何学Pythonuld that work?
What if I want to load only those elements which are branched out only in prvt branch not any other element as I suppose
element /myVob/myPath /main/LATEST
element /myVob /main/LATEST
might get files which branch out from the main latest also in myPath directory. But this is very much useful only for directories as I wouldn't have branched out the directories of the checked in file element in the private branch
This will only work if every element has a prvt branch.
So if your files are in /myVob/myPath
, the config spec
element * .../prvt/LATEST
will select the right versions (those in LATEST of prvt branch), only if /myVob has a prvt branch (i.e. has already been checked out / checked in in that branch), and if myPath
has a prvt
branch.
If the leading path has no prvt
branch, no version will be selected, meaning the files within that path won't have a chance to be selected by your selection rule.
That is the real issue here.
That is why I recommend adding some stopping rules:
element * .../prvt/LATEST
element /myVob/myPath /main/LATEST
element /myVob /main/LATEST
That way, within /myVob/myPath
, only the right versions are shown, but for the path *leading** to those files, you have at least backup config spec rules which allows you to at least select one version.
If you know the branch from which prvt
branch has been done, using that branch name would be safer.
If you don't '/main/LATEST
' is a sure bet, since the main
branch always exists.
the best way I found out to do this task was:
cleartool find . -version "brtype(BRANCH_NAME) && version(\main\VIEW_NAME\BRANCH_NAME\1)" -print
Yes, I know, \1 in the end will only return the first version, but that's ok, by doing this, you already know every single file you have checked-in, at least once.
精彩评论