Mercurial Diff Merge: What tool is this and how do I use it? Mercurial Diff Merge: What tool is this and how do I use it? linux linux

Mercurial Diff Merge: What tool is this and how do I use it?


This is vimdiff. You can learn more about it by running man vimdiff.

However, I would recommend using mercurial's internal:merge tool. It will perform the merge and, if a conflict occurs, insert conflict markers in the file and notify you that there was a conflict. You then open up the file, resolve the conflict, remove the conflict markers, mark the file as resolved, and when all files are cleaned up you can commit the result of the merge. This is very similar to how subversion handles conflicts. You can configure mercurial to use internal:merge by adding the following to your ~/.hgrc file:

[ui]merge=internal:merge

The tool you'll use to get the list of conflicted files and mark them resolved is called hg resolve, so I would recommend running hg help resolve to learn more about that tool. You can learn more about mercurial's support for merge tools by running: hg help merge-tools.


Seems like you need some help in using Vim's diff module. See one of these:

If you're not comfortable using Vim, there's surely an option that lets you specify your own favourite diff tool, but I don't know HG, so I can't tell you which option you'll have to modify.

The opened Vim has three files being diffed, so I guess you ran into some conflicts when doing the hg update.


From my experience, the tool which is - by far - easiest to use for most people is kdiff3 (intuitive menu, natural view with base and both tips above and resulting text below, good keyboard shortcuts - Ctrl-1/Ctrl-2/Ctrl-3 to pick snippet from first/second/third window, Ctrl-arrows to jump from conflict to conflict). Just install this program and give it highest priority in merge-tools configuration (set

[merge-tools]kdiff3.priority=1000

).

In general: whichever tool you use, it shows you conflicted versions of the file and expects you to create the final version.