views:

590

answers:

3

I can get diffs between two revisions using something like

svn diff -r 100:200 > file.diff

But the problem is that there are many lines that show up due to change in whitespace. Is there a way to only write those lines that actually change in a significant way and not just in whitespace?

+1  A: 

You can use an alternate diff command using the --diff-cmd argument for svn diff. diff is a good utility that has plenty of features for ignoring whitespace.

tschaible
actually i used svn diff --diff-cmd /usr/bin/diff -x "-w" -r 2000:2100 > jj1 and it works. thanks
+3  A: 

You can use

svn diff -r 100:200 -x -b > file.diff

HTH

jrbjazz
Is that new for 1.6? SVN never use to do that. I should keep more current :)
Dan McGrath
1.5.4 does it. But: --ignore-space-change, not --ignore-space-changes
ur
@Dan McG. Do not know if is new for 1.6, but entry number 8 at http://www.akatombo.com/en/comments/ignore_whitespace_in_a_subversion_diff/ suggest that it is available since 1.4
jrbjazz
@ur. Sure. Sorry for the typo. Corrected.
jrbjazz
+1. I should really talk to work about our software policy re updating... Or start doing more at home...
Dan McGrath
+1  A: 

Use "-x --ignore-space-change" or "-x --ignore-all-space" (see svn -h diff)

ur