ClearCase‎ > ‎UCM FAQ‎ > ‎

Avoiding and Surviving Evil Twins


An Evil Twin in ClearCase is a term used to describe two different elements (files or directories) that the developers conceptually recognizes as different versions of the same elements, but whereas ClearCase recognizes the same two elements as two completely unrelated elements that just happens to share the same name.

How are Evil Twins created?

The short version is, that:

Every time a user expected to see a 'check-in' menu item but instead finds a 'add to source control' menu item and ignores the fact that the check-in is missing and goes for the second-best and adds the element ...again!

In most situations Evil Twins are unwanted! And typically the ClearCase administrators will have installed triggers that prevents them from being created. The Add to source control operation is simply cancelled if the folder that you are about to add elements to has a previous version (anywhere in the version tree) that has already used the name you're trying to (re)introduce.


OK, so I either can't or shouldn't create an Evil Twin - but how do I then manage to make the elements show in my directory?


A very short version of the answer to the question could be:

Simply merge the older version of the directory that contains the missing files and folders into the version where you want them to show up.

And the somewhat longer answer then includes a solution to the next question: How simple is that then really?

There are two different approaches to the solution. One is to work from the version tree view of the directory and is quite easy to use, but deals only with files one level deep, and therefore is't not so simple if the element you are working on is actually a directory itself, which also contains files and directories - use this approach if you are dealing only with files (not directories) and only one level deep.

The other Solution is simply to start the merge manager clearmerman.exe  (The pre-UCM alternative to deliver and rebase operations) of if you are more sophisticated you could do it from the command line using the cleartool findmerge command - use this approach if you are dealing with a directory that also contains elements.

Please continue reading in one of the following FAQ's:

Howto merge using the version tree view
Howto merge using the ClearCase Merge manager
Howto merge using the cleartool findmerge command