views:

106

answers:

2

I've tried adding merge=kompare to my ~/.hgrc, but when I run hg merge, it runs kompare, but there's no UI to be seen. Hg says merging path/to/first-file and stays there, actionless.

A: 

You will also need to add a section that explains how to call Kompare. I don't know Kompare, so I don't know what the command line should look like (no guarantees for the kompare.args line), but it should be something like this:

[merge-tools]
kompare.executable = C:\<path...>\kompare.exe
kompare.args = $base $local $other -o $output
kompare.priority = 1
kompare.gui = True
kompare.binary = True

If merges aren't detected correctly, you might want to add

kompare.checkconflicts = True
kompare.checkchanged = True
Tim Pietzcker
kompare.args are completely wrong; those would work fine for kdiff3, but make no sense for kompare. For instance, -o means ``This will open URL1 and expect it to be diff output.'' Obviously this is not the case. On top of that, kompare doesn't do 3-way merges, so there's no point in giving it 3 files.
scvalex
@scvalex: Thanks for the information. As I wrote, I don't know Kompare (and didn't look further into it when my answer was accepted). Of course, if it can't do 3-way merges anyway, it's not really a good idea to use it in Mercurial I guess. I would still like to correct my answer - can you help me out here?
Tim Pietzcker
+2  A: 

The kompare.args posted earlier probably wont work. I've had difficulty using Kompare for merging, especially 3-way merges (which are preferred and safe). BTW, most of the other options are enabled by default I believe, but you can verify with: hg showconfig merge-tools

You are better off using kdiff3. Incase you are on Ubuntu Intrepid, kdiff3 was erroneously removed from the repos - but you can easily compile from source.

imran.fanaswala
Yeah, I ended up going for kdiff3 too.
obvio171