Reputation: 21371
I am new to mercurial, I am quite familiar with TortoiseHG, but this is the first time I am managing a project in a headless linux environment. I do an hg update
after a push, and I get this screen:
Help section says it's vim, how do I go about merging my application.
Upvotes: 28
Views: 16826
Reputation: 1459
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.
Upvotes: 3
Reputation: 2058
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
.
Upvotes: 47
Reputation: 67047
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
.
Upvotes: 8