version-controlclearcaseclearcase-ucm

Recover version tree on removed directory


I'm working with clearcase 8.0.1.17

I removed a directory containing 4 other directory with multiples files :

I checked in this and made a baseline. Now I want to recover DirA with only DirA2. I recreated both directory with the 10 files from my backup but I've lost all the versions trees.

How can I do to recover version trees ?


Solution

  • You cannot just recreate the folder/files, or you would create evil twins (elements with the same name but different history/version tree): you can list evil twins here.

    You need to delete your new elements, and open the version tree of the parent folder of DirA.
    You will see a version tree like:

     n-3 (list DirA)
     n-2 (delete DirA)
     n-1 (import new DirA folder: evil twins)
     n   (delete DirA again)
    

    You can then merge the n-3 version (which listed DirA) to the current (where you deleted DirA)
    That will restore the subfolder entry DirA.

    Repeat that for version tree of DirA itself (that will restore the DirAx folder entries)

    Full details in "How to restore an element that has been rmnamed", but here the idea is: do that for the folders first.
    Then the files if needed.

    See also "Undo remove file in ClearCase", using cleartool ln.