How would you select versions from a specific branch in ClearCase?

后端 未结 2 1093
感动是毒
感动是毒 2021-01-14 12:24

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 prv

相关标签:
2条回答
  • 2021-01-14 13:05

    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.

    0 讨论(0)
  • 2021-01-14 13:05

    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.

    0 讨论(0)
提交回复
热议问题