问题
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?!
回答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.
来源:https://stackoverflow.com/questions/11414024/clearcase-files-in-2-branches-obscure-each-other