Mercurial: No editor appears when merge conflicts are detected

流过昼夜 提交于 2019-12-30 10:27:55

问题


I wonder if anyone here has any experience with mercurial running on Ubuntu? I've been playing with it all morning and love everything I've seen so far.

The one problem I though is when I do a merge and conflicts are detected, it doesn't automatically bring the file up in the command line editor to allow me to resolve the conflicts. It just tells me there's a conflict, then it's up to me to open the editor and resolve it.

But this is strange as the docs show that the editor is automatically launched when there is a merge conflict. I know it's not a problem with the editor (nano) in general as it's works when I do a commit and have to add a comment.

Any ideas?

Chris

p.s I already tried the mercurial IRC channel, but silence....


回答1:


You probably need to define your merge tool in ~/.hgrc:

[ui]
merge = vimdiff



回答2:


What commands are you using, and what does your ~/.hgrc look like? If you're using the fetch extension, it should be opening up a configured merge tool when a conflict is detected.

I detailed my full mercurial config a while back in a blog post where I use kdiff3 as my merge tool.

When doing an "hg fetch" or an "hg merge" (after a conflict is detected) it launches kdiff3 as you'd expect and lets me resolve the merge.



来源:https://stackoverflow.com/questions/399606/mercurial-no-editor-appears-when-merge-conflicts-are-detected

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