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.