mardi 24 décembre 2013

Use Beyond Compare as SVN diff tool under Linux

Today a quick note on that topic as I extended my own configuration with that tricks. BeyondCompare is a well known tool to compare and merge different  version file.

I used it a lot combined with ToirtoiseSVN, but as I worked more and more under linux using Remote Workstation, I would also use it. But I mainly work on remote workstation using a putty prompt. I will not describe here how to setup bcompare on a linux workstation, but it’s the 1st thing todo.

Next you have to follow my previous post to redirect the all X application to your local (I mean Windows 7 in my case) X11 server.

Now when you run “svn diff” on a file, you expect to use bcompare. To achieve that goal, follow me step by step.

cd ~

touch .subversion/bcompare_svn.sh

nano .subversion/bcompare_svn.sh

COPY/PASTE the folllowing in that script:

#!/bin/bash

/usr/bin/bcompare $6 $7 &

exit 0

Set execution permission

chmod 755 .subversion/bcompare_svn.sh

nano .subversion/config

Add that line just after “# diff-cmd = diff_program (diff, gdiff, etc.)”


diff-cmd=/home/YOURFOLDER/.subversion/bcompare_svn.sh

And done !

Now at each svn diff  command you start, BeyondCompare will start and display on the own PC.

Aucun commentaire :

Enregistrer un commentaire