Mercurial/Meld中的3种方式如何合并? [英] How does the 3 way merge in Mercurial/Meld work?

查看:115
本文介绍了Mercurial/Meld中的3种方式如何合并?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个项目中进行提交,该提交引入了一项功能,该功能具有无法立即发现的重大问题.现在,我想完全删除该修订版,同时紧随其后,但是我很难把这3种方式合并.这是我的项目的简化图.

I'm working on a project where I have a commit that introduced a feature with major problems that weren't discovered immediately. Now I want to completely remove that revision while keeping the work following it but i'm having a hard time wrapping my head around this 3 way merge. Here is a simplified graph of my project.


o  changeset:   134:7f81764aa03a
|  tag:         tip
|  parent:      128:451d8a19edea
|  summary:     Backed out changeset 451d8a19edea
|
| @  changeset:   133:5eefa40e2a29
| |  summary:     (Change I need to keep keep)
| |
*snip 3 commits*
| o  changeset:   129:5f6182a97d40
|/   summary:     (Change I need to keep keep)
|
o  changeset:   128:451d8a19edea
|  summary:     (Change that introduced a major problem)
|
o  changeset:   127:4f26dc55455d
|  summary:     (summary doesn't matter for this question)

如果我正确理解这一点,则r127和r134完全相同.当我hg up -C -r 133然后运行hg merge时,Meld弹出三种形式的文件之一:本地文件,基本文件和其他文件.当地人似乎是r133,但我很难理解基本"和其他"的含义.

If I understand this correctly, r127 and r134 are exactly the same. When I hg up -C -r 133 and then run hg merge, Meld pops up with three forms of one of my files: local, base, and other. local seems to be r133 but i'm having a hard time wrapping my head around what "base" and "other" mean.

推荐答案

本地是r133

其他是r134

基数是r128(r133和r 134的共同祖先)

Base is r128 (the common ancestor to both r133 and r 134)

当您执行三向合并时,它将所有三个合并在一起,以帮助您决定从何处摄取什么.通过查看其他修订中的更改以及共同祖先的外观,您可以对保留的内容和更改的内容做出更明智的决定.

When you perform a 3 way merge it compares all three of those together to help you decide what to take and from where. By seeing what change is in the other revision and what the common ancestor looked like you are able to make a much more informed decision about what to keep and what to change.

这篇关于Mercurial/Meld中的3种方式如何合并?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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