Search code examples
svnclearcase

How we can checkout the particular codebase(or data) of previous version in svn and ClearCase


I am going through the version tools and Here I learned that we can tag our changes and can secure our old data in repository and can reuse in future. So my question is how we can checkout the codebase of some old verison:

Say, I have the single branch "abc_01.00" which is used by all developers, as the time goes, I have applied below verison on same branch:

  1. 00.00.01 (for 2012 year)
  2. 00.00.02 (for 2013 year)
  3. 00.00.03 (for 2014 year)

Now, there is some urgent requirement and I want to checkout the codebase for year 2012 against "00.00.01" tag. So how I can do this as branch is same for all three version in svn or ClearCase.


Solution

  • In ClearCase, you would define a config spec which would:

    • select all versions at the right tag
    • create a new branch for any new versions created from that starting point.

    That would give a view with:

    element * CHECKEDOUT
    element * .../myBranchFromv1/LATEST
    element * /main/0 -mkbranch myBranchFromv1
    element * 00.00.01
    element * /main/LATEST 
    

    (Even if you don't have a label, you can create a config spec starting from a certain date)


    In SVN, that would simply be a svn copy.

    svn copy your.repo.URL/tag/00.00.01 your.repo.URL/branches/myBranchFromv1