How do I make Subversion use a third-party diff tool?

dicroce picture dicroce · Nov 12, 2008 · Viewed 20k times · Source

I need more than the default diff! I have recently purchased "Beyond Compare" and I'd like to integrate it with svn, so its launched when I type:

svn diff foo.c

How do I do this?

Answer

Ned Batchelder picture Ned Batchelder · Nov 12, 2008

From a Beyond Compare forum post:

/usr/bin/bcompare_svn:

#!/bin/bash
/usr/bin/bcompare $6 $7 &
exit 0

The invocation of bcompare is obvious but I had to add "exit 0" so that svn would open more than one file at a time.

To make svn invoke my script, I added the following line in the [helpers] section in ~/.subversion/config

diff-cmd=/usr/bin/bcompare_svn