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>