How to SVN Diff Ignoring white spaces

That’s some of the things I started to encounter a lot about this thing. A diff without whitespaces. It creates a big confusion to understand and review the patch. So I searched a bit. I had used it once a time, but was forgeting a lot. That’s a post a to remember it anyway :)

By using an external diff tool you can take a whitespace ignored diff by using:

svn diff --diff-cmd diff -x -uwBEb

There is a double “-” before diff-cmd but it looks like as a one I don’t know why.

This command will use the unix system’s diff command with arguments -uwBeb which has something to do white ignoring all type of white spaces.

Well during my research I have found out even the external diff programs were available to use, in the Subversion‘s core libraries this option was available. This enhancement had been checked in some time ago and was intended to be added to 1.4.6 or something like that. 1.5 had came anyway but it seems that it doesn’t quite really works. At least I was not able to find something useful the -w was still ignored! But somehow I was able to take a whitespace ignored diff via TortoiseSVN. I’m not yet sure if this is an external ability it does use an svn diff’s core ability or not. I assume that it had something to do with merge and blame commands. Perhaps there is a trick I don’t know that by using these commands you can take a white space ignored diff