Feb14
2007

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 Responses to “Using a different diff with Subversion”

  1. Shane Long Says:

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

  2. Martin Murphy Says:

    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.

  3. James Mernin Says:

    Thanks Martin, I replaced the paragraph tags around that text with tags and it has resolved the translation issues being seen.

  4. Lal Says:

    nice hint. Never thought of re-piping.

Leave a Reply

Calendar

February 2007
M T W T F S S
« Dec   Mar »
 1234
567891011
12131415161718
19202122232425
262728