Olivier Biot said:
> Hi Gisle,
>
> SVN automagically generates unified diffs, so running "svn diff" is OK!
Unfortunately, what he might have *meant* to say is "The built-in diff
tool doesn't accept '-b' or '-w' options to ignore whitespace changes".
"svn help" says:
Valid options:
...
-x [--extensions] arg : pass ARG as bundled options to GNU diff
but it appears to be lying:
% svn diff -x -w tethereal.c
subversion/libsvn_client/diff.c:456: (apr_err=200016)
svn: '-w' is not supported
% svn diff --extensions -w tethereal.c
subversion/libsvn_client/diff.c:456: (apr_err=200016)
svn: '-w' is not supported
% svn diff --extensions -b tethereal.c
subversion/libsvn_client/diff.c:456: (apr_err=200016)
svn: '-b' is not supported
I don't know if this particular problem still exists:
http://svn.haxx.se/dev/archive-2003-03/1194.shtml
"this is a known problem. current versions of svn use our internal diff
library, which doesn't have support for the various flags you used to be
able to pass to gnu diff via svn's -x option. if you want those
options, you can use the --diff-cmd option (i think that's the option, i
might be wrong, as i don't have an svn install on this machine) use gnu
diff instead of the built in diff library. "
A later message says you can force Subversion always to use an external diff:
http://svn.haxx.se/dev/archive-2003-03/1199.shtml
"To always use external diff, you can put the following in your
~/.subversion/config file:
[helpers]
diff-cmd = /usr/local/bin/gdiff
diff3-cmd = /usr/local/bin/gdiff3
# This one depends on which version of gnu diff you have,
# check its man page (sorry, info file).
#diff3-has-program-arg = false"
I seem to remember having to persuade Perforce to do the same thing in
order to get support for diff flags that Perforce's built-in diff doesn't
handle; it's annoying that building into revision control systems diff
code that doesn't understand helpful options such as -b and -w appears to
be a bit of a popular option.