ClearCase: Files in 2 branches obscure each other

☆樱花仙子☆ 提交于 2019-12-23 03:35:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!