简体   繁体   English

Mercurial:合并冲突后,编辑器不显示冲突文件

[英]Mercurial: Editor doesn't show the conflict file after a conflicted merge

After having solved the problem of getting the editor to launch when there's a merge conflict - Mercurial: No editor appears when merge conflicts are detected 解决合并冲突时启动编辑器的问题后-Mercurial:检测到合并冲突时不显示编辑器

I now have another problem, the editor now launches but opens the files in the following order: 我现在遇到另一个问题,编辑器现在启动,但按以下顺序打开文件:

hello.c hello.c~base.???? hello.c hello.c〜base。???? hello.c~other.???? 的hello.c〜其他。????

But what I really want to see is the file that highlights the conflicts, which I expect should be the first one hello.c, but instead hello.c just shows the tip. 但是我真正想要看到的是突出显示冲突的文件,我希望它应该是第一个hello.c,但是hello.c只会显示提示。

Any advice? 有什么建议吗?

Regards, 问候,

Chris 克里斯

I'm not sure what tool you're using for merges, but it sounds like it's doing a 3-way merge . 我不确定您要使用哪种工具进行合并,但听起来好像是在进行3向合并 The left pane is normally the common ancestor, the middle pane is the file you're merging in, and the right pane is your changes to the file. 左窗格通常是公共祖先,中间窗格是您要合并的文件,右窗格是您对该文件的更改。

I really like kdiff3 (free and open source) for merges and would recommend it if the tool that you're using isn't working for you. 我真的很喜欢kdiff3(免费和开源)进行合并,如果您使用的工具不适合您,我会推荐它。 It's in the mercurial documentation as the example merger that they use in many places. 他们在许多地方都使用Mercury文档作为示例合并。

The first file ends up being the finished merge, so you need to make sure you manually copy in all changes from the other two files. 第一个文件最终是完成的合并,因此您需要确保手动复制其他两个文件的所有更改。 Vimdiff works well for this as it highlights all differences between the three files. Vimdiff为此很好地工作,因为它突出显示了三个文件之间的所有差异。 I'm not exactly sure how the three files are generated, but this process does seem to work for me. 我不确定这三个文件是如何生成的,但是这个过程似乎确实对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM