Custom diff's with Subversion

Subversion --diff-cmd and diff3-cmd switches

--dif-cmd and GNU diff

By default, subversion uses it's internal diff to generate output for the diff subcommand. This works great for generating patches, but can difficult to read. By supply the --diff-cmd switch, you can tell subversion to use an external diff engine like 'GNU diff' and thereby get some more readable results.

Side-by-Side diff

svn --diff-cmd "diff" --extensions "-y" diff

*NOTE: the --extensions switch can only be used if the --diff-cmd is also used.

It might be helpful to increase the width of the line for the commandline diff (GNU diff defaults to 130 chars):

Side-by-Side diff with 300 char width

svn --diff-cmd "diff" --extensions "-y --width=300" diff

--diff3-cmd

By using the diff3-cmd switch, you can tell subversion what shell command to use for merging. This could be a good place to make some groovy (or rather groovy groovy) script hooks into the merge process.