当透明盒“邪恶双胞胎”出现时,将被创建以及如何避免? [英] When clearcase "evil twins" will be created and how to avoid it?

查看:83
本文介绍了当透明盒“邪恶双胞胎”出现时,将被创建以及如何避免?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一个同事在多个地方签入了一个exe。每当我们可能需要在多个位置签到时,我们通常会在一个公共位置签到,然后在所有其他地方创建符号链接。

One of my collegue check-in an exe in multiple places. Whenever we may need to check-in at multiple places, we normally would check-in that in one common place and then create symlink in all the other places.

并没有意识到这种做法,并做到了。他在流中完成了此任务,并将其交付给集成流。

But he is unaware of that practice and did it. He did that in his stream and delivered that to integration stream.

如果我们要求他删除文件并替换为symlink(然后将其再次交付给集成流,会导致邪恶的双胞胎吗?

If we ask him to delete the file and replace it with symlink (then deliver it again to integration stream, will it lead to evil twins?

何时会创建邪恶的双胞胎?在UCM中,如果我们创建一些文件,则根本不安全删除(假设我们没有这样做)。应用基线,我们只是创建并交付)?

When evil twins will be created? In UCM if we create some file, is it not safe to delete at all (assume we did not apply baseline ,we just create and delivered) ?

推荐答案

它们是在您添加相同名称的文件时创建的。两个不同分支的目录。

这不是UCM特有的,但是它将使合并(或在UCM中,交付或变基)更加困难,因为它将在目录合并步骤中停止合并,并询问您可以在合并目录中的两个文件(名称相同)之间进行选择。

They are created when you add a file with the same name in the same directory for two different branches.
This is not UCM specific, but it will make merges (or in UCM, deliver or rebase) harder because it will stop the merge at the "directory merge" step, asking you to choose between the two files (identically named) within the merged directory.

文件两次添加到源代码管理的问题是将生成两个不同的对象id,因此有两个不同的历史记录:您将无法合并文件本身,

The problem of "adding to source control twice" a file is that is will generate two different object id, hence two different history: you won't be able to merge the file itself, you will only be able to delete one and keeping the other.

有关更多信息,请参见:

For more, see:

  • "What's the easiet way to detect "evil twins" in Rational ClearCase?".
  • "Evil twin problem and subtractive merge"

我的同事已经传送了一个文件,如果他删除了他的流中的文件并用symlink替换了文件并再次传送。它会导致邪恶的双胞胎吗?

my collegue already delivered a file, if he deleted that in his stream and replace it with symlink and deliver again. Will it lead to evil twins?

Symlink是恢复正确文件的好方法(如 cleartool ln ),但是我通常通过合并操作来进行符号链接。

您可以随时:

Symlink is a good solution to restore the right file (as presented in cleartool ln), but I usually do that symlink through a merge operation.
You can at any time:


  • 检出邪恶双子文件的父目录

  • 删除该文件(rmname)

  • 从父目录的源版本(包含正确的文件)合并到同一父目录的当前检出版本(选择手动合并)

  • 通过以下方式解析合并将正确的文件添加到父目录的目标版本中

  • 签入父目录

  • checkout the parent directory of your evil twin file
  • remove it (rmname)
  • merge from the source version of the parent directory (which contains the right file) to the current checked out version of the same parent directory (select a manual merge)
  • resolve the merge by adding the right file to the destination version of the parent directory
  • checkin the parent directory

然后,您可以再次传送,知道只有正确的oid正确的文件将被传播。

Then you can deliver again, knowing that only the right file with the right oid will be propagated.


会导致邪恶双胞胎吗?

Will it lead to evil twins?

仅当在上一个传递的合并解析期间选择了错误的文件时,才会再次导致邪恶的双胞胎

如果保留了正确的文件,并且您按照上述过程恢复了正确的文件,那么下一次交付就可以了。

It would lead to an evil twin again only if the wrong file was chosen during the merge resolution of the previous deliver.
If the right file was preserved, and if you restore that right file following the process above, then the next deliver will proceed just fine.

这篇关于当透明盒“邪恶双胞胎”出现时,将被创建以及如何避免?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆