How do you get all files of a VOB as of a given date in a clearcase vob?

社会主义新天地 提交于 2019-12-08 06:24:41

问题


I have a fairly large codebase with several directories and files and I would like to check out a view or have a view as of a given date (Septermber 12th). I am manually checking file histories and doing ct get -to someOtherDir/FileName FilenName@@/main/## and this is extremely painful. I wonder if there is a way to do a checkout and load everything as of a particular day at once?


回答1:


The easiest way is to make a separate dynamic view, with a config spec including a time-based selection rule (or time rule for short, see cleartool man config_spec).

See as an example "ClearCase : Loading Older Version of a specific Directory?".

Since you want to checkout files, you need to complete your selection rule by a mkbranch directive.

element * .../aBranch/LATEST
element /aVob/myComponent/mySubDirectory/... .../aParentBranch/LATEST -time dd-Month-yyyy -mkbranch aBranch
element * /main/LATEST

If those elements were all created on 'aParentBranch', they will be selected at the right date, and branched into a new branch 'aBranch' when checked out.

If those elements were all on /main, you can switch the last two selection rules into:

element * /main/LATEST -time dd-Month-yyyy -mkbranch aBranch 

From the man page:

-time date-time

Modifies the meaning of the special version label LATEST:
the rule selects from a branch the last version that was created before a particular time.



来源:https://stackoverflow.com/questions/12827214/how-do-you-get-all-files-of-a-vob-as-of-a-given-date-in-a-clearcase-vob

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!