Code

gitk: Allow users to view diffs in external diff viewer
authorThomas Arcila <thomas.arcila@gmail.com>
Mon, 24 Mar 2008 11:55:36 +0000 (12:55 +0100)
committerPaul Mackerras <paulus@samba.org>
Sun, 11 May 2008 00:50:05 +0000 (10:50 +1000)
commit314f5de1a0b91d27cbbb8a400337dd41cf84d511
tree13a22a5ff81b7358b27d9128a0d0c57b9bb34296
parentf4c54b3cc4b1bbde34fe957ac03f9862ec970de3
gitk: Allow users to view diffs in external diff viewer

This allows gitk to run an external diff viewer such as meld.

Right-click on a file in the file list view gives "External diff"
popup menu entry, which launches the selected external diff tool.
The menu entry is only active in "Patch" mode, not in "Tree" mode.

The program to run to display the diff is configurable through
Edit/Preference/External diff tool.  The program is run with two
arguments, being the names of files containing the two versions to
diff.  Gitk will create temporary directories called
.gitk-tmp.<pid>/<n> to place these files in, and remove them when
it's finished.

If the file doesn't exist in one or other revision, gitk will supply
/dev/null as the name of the file on that side of the diff.  This may
need to be adjusted for Windows or MacOS.

[paulus@samba.org - cleaned up and rewrote some parts of the patch.]

Signed-off-by: Thomas Arcila <thomas.arcila@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk