Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 981
dicroce Avatar asked Nov 12 '08 16:11

dicroce


People also ask

How to compare two files in svn?

Just hold down the Shift key while you right click on the file. Then select TortoiseSVN → Diff with URL. In the following dialog, specify the URL in the repository with which you want to compare your local file to.


1 Answers

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
like image 93
Ned Batchelder Avatar answered Oct 18 '22 20:10

Ned Batchelder