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?
The easiest way is to make a separate dynamic view, with a config spec including a <strong>time-based selection rule</strong> (or time rule for short, see <a href="http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/config_spec.htm" rel="nofollow">
cleartool man config_spec</a>).
See as an example "<a href="https://stackoverflow.com/questions/634509/clearcase-loading-older-version-of-a-specific-directory/635282#635282" rel="nofollow">ClearCase : Loading Older Version of a specific Directory?</a>".
Since you want to checkout files, you need to complete your selection rule by a
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 <a href="http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/config_spec.htm" rel="nofollow">man page</a>:
Modifies the meaning of the special version label
the rule selects from a branch the last version that was created <em>before</em> a particular time.