Using a different diff with Subversion

If like me, you’re not too keen on the sometimes cluttered output produced by a Subversion diff command (svn diff), here is a way to use Unix diff with Subversion instead. I’ve also used the -b parameter to ignore whitespace differences.

$ svn diff --diff-cmd diff --extensions '-b'

It looks a little messy at first but you could probably alias it quite easily using something like:

alias "svn_diff_b"="svn diff --diff-cmd diff --extensions '-b'"

in your .bashrc (or equivalent) file.

4 thoughts on “Using a different diff with Subversion”

  1. Nice, much better than using something like tkdiff which I used to use with RCS/CVS in a past life….

  2. Excellent James, I had to use this today and it’s very handy here. Just one point the text of the article has changed the double-hyphens into single dashes also altered the apostrophes.

Leave a Reply