Hints and tips on svn

These are some helpful hints on various topics.

 

Ignoring whitespace in subversion command line diff


Unlike diff subversion's svn diff doesn't have many modifier flags, particularly ignoring whitespace. To achieve this force svn to use desired external diff command using --diff-cmd option:

svn diff --diff-cmd diff -u -w working/copy/file


Adding all new files from the subversion working copy in a single command


When there are a lot of new files in the working copy, its not very handful to list them all in the svn add command. Here's how it happens automatically:

svn stat /local/working/copy | grep "^?" | awk -F "      " '{print $2}' | xargs svn add