Setting up colourised svn diffs

This is mundane, but something I will no doubt forget, and so for my own posterity:

The svn diff is monochrome by default. Let’s install colordiff and change that.

sudo apt-get install colordiff
vi ~/.subversion/config

In the [helpers] section set the diff command to /usr/bin/colordiff

To ensure that when you do svn diff | less the control characters for the colours are rendered correctly you’ll need to set the default options for less:

Edit ~/.bash_profile and add

export LESS=R

Then run source ~/.bash_profile. Done!

Published by

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.