This is a subjective evaluation of KDiff3. Please add your opinion.


KDiff3 is a KDE / Qt graphical merge and diff tool. For 3-way merge it can show both the 2 parent versions and their common ancestor side-by-side in top panes and the editable merge result in the bottom pane.

It is GPL and runs on "all" platforms. It is included in the TortoiseHg installer for Windows.

Usage notes and tips

More tips

Add to ~/.hgrc:

hgext.extdiff =

cmd.kdiff3 =

kdiff3.args = $base $local $other -o $output

This adds a new graphical diff command hg kdiff3 (using ExtdiffExtension), and tells Mercurial to use kdiff3 for merges.

Useful shortcuts that can be defined in Settings / Configure Shortcuts:

You can move between file panes and directory pane using Alt-Left and Alt-Right.

You can compare arbitrarily selected files. Click on left square of old file, and "A" appears in the square. Click on right square of new file, and "B" appears in the square. Right-click on the "B", and select "Compare Explicitly Selected Files".

If you want to view some file in your favorite editor (e.g., to get usual syntax highlighting, and large window), you can copy-and-paste file name at the top of the file window pane, and open it in your editor. All other modified or added files are in the same directory, so you can just navigate to them from your editor instead of selecting them in kdiff3 and repeating cut-and-paste. (In order for this to work, don't use the --L1 base --L2 local --L3 other described in earlier section.)

When you run kdiff3 directly, the following may help when comparing two source trees:


On Mac, kdiff3.app executable location is /Applications/kdiff3.app/Contents/MacOS/kdiff3. Make sure you add /Applications/kdiff3.app/Contents/MacOS to your $PATH, or create a symlink from a directory in your $PATH to /Applications/kdiff3.app/Contents/MacOS/kdiff3 (or create a wrapper script, or ...), if you want to invoke kdiff3 from command line or from Mercurial invoked from command line.



KDiff3 is the "best" merge tool; stable and feature rich.

KDiff3 (last edited 2013-09-01 01:15:55 by KevinBot)