什么是three-way merge

A, B and C means three-way. C是A和B的父亲,D是A和Bmerge之后的结果

The three-way merge uses the ancestor of the changed files to identify blocks of content that have changed in neither, one, or both of the derived versions.

使用C的内容来标记A和B的内容有没有改变(1.A和B都没有变,2.A或者B变了;3.A和B都变了)

Blocks that have changed in neither are left as they are.  如果是1的话,不需要merge。

Blocks that have changed in only one derivative use that changed version. 如果是2的话,D的内容和改变了的A或B一样。

If a block is changed in both derivatives, the changed version is used if it has the same content on both sides,

如果是3的话,有分为两种,A和B的改动一样,则D的内容和A或者B一样;

but if the changes differ, it is marked as a conflict situation and left for the user to resolve.

但是如果A和B的改动不一样的话,这时就会进入冲突模式,需要人去手动的解决了。

下图就是在clearcase中出现冲突后使用xmerge解决冲突的截图(相关code我已经隐去)。


http://en.wikipedia.org/wiki/Three-way_merge
http://en.wikipedia.org/wiki/Diff3
kdiff3. sourceforge.net


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值