Xxdiff
From DesigningPatterns
Background
xxdiff is a graphical diff and merge tool. It comes with very comprehensive subversion support, although currently is has no built-in git support.
Installation
- Download and install xxdiff; I found RPMs for it here.
- Download and unpack the official xxdiff distribution in order to get the xxdiff Python scripts (including wrappers that make xxdiff play nicely with subversion).
- Install the Python scripts with
python setup.py install. - Modify the site-wide subversion config file (
/etc/subversion/config) to use xxdiff and emacs (for creating comments, etc). Enter:
[helpers] diff-cmd = xx-diff-proxy diff3-cmd = xx-diff-proxy
- Create a wrapper around the
xx-diff-proxyscript that git can call for diffs. Here is/usr/bin/xx-git-diff:
#!/usr/bin/env sh xx-diff-proxy $2 $5
- Modify the site-wide git config file. Enter:
git config --system diff.external xx-git-diff git config --system merge.tool xxdiff
This should produce an /etc/gitconfig with:
[diff]
external = xx-git-diff
[merge]
tool = xxdiff
-
/usr/designingpatterns/etc/profilesets theXXDIFFRCenvironment variable to/usr/designingpatterns/etc/xxdiffrc, which contains site-widexxdiffcustomization (such as default font). - Make this small change to the
diffproxy.pyscript in/usr/lib/python2.4/site-packages/xxdiff/scripts.
The code before:
if opts.merge:
dargs.append('--merge')
The code after:
if opts.merge:
dargs.append('--merge')
dargs.append('--show-merged-pane')
This will make the xxdiff adapter that subversion calls add a merge pane when (and only when) doing merges; there does not seem to be a way to configure xxdiff to do this on its own.
