1

I have checked in the same file (filename) twice in 2 different branches (say, development and release).

This breaks just about anything, so I want to take 1 version and "properly" copy/merge it to the other branch, later merging in the lost changes manually (from a backup). Then I would lose history for 1 file but at least the 2 files would be connected again.

How to do it?


Also note, since the connection is broken, I cannot mere, also, when doing a Version Tree, both files have different version trees. (It is not 2 views at different files in 1 Version Tree, like is the normal/correct case.)

Also, I assume the problem is with the folder having some kind of a reference to 2 different files, but somehow, I cannot edit the folder?!

Andreas Reiff
  • 7,961
  • 10
  • 50
  • 104

1 Answers1

1

Those are call "evil twins" (also described in that SO question)
(one less thing to worry with Git ;) )

The easiest way is to pick one branch:

  • remove the file from the other branch (rmname),
  • and to the merge.

The merge will add that same file in the other branch.
That process (rmname + merge) is illustrated in "Clearcase: How do I merge in a specific file from one view, into another, to avoid the Evil Twin scenario?"


(edit by Andreas)
Your solution worked great, I changed it for me since I noticed I have a specific case:
The file got bad since someone else renamed it... so it was not just as simple as your solution, but I had to do it "by hand", as is

Go to X:\FullyQualifiedPath (correct path in VOB)

Use:

cleartool ln FullyQualifiedName ./FileName

where FullyQualifiedName is the name as you get it e. g. from VersionTree when you say “Send To -> Copy” (something like //view, drop the file: before). This creates the link

Afterwards, you can see the desired version in the ClearCase Explorer again.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks a lot! I added my way, similar to one in a post referenced by you (using cleartool ln). Worked great. Looking froward to using a different Version Control System again soon. :) – Andreas Reiff Jul 10 '12 at 14:05
  • @Andreas Thank you for the feedback. I have added your edit to the answer. – VonC Jul 10 '12 at 15:31