Reviewing svn changes

I have a habit of reviewing my changes before committing them to the repository. What suprises me is that so far I have only seen home-brewed scripts to perform a ‘batch’ review of all changed files. But ok, how difficult is that? So for my current project I came up with a similar solution. Here are some lines of bash script:


# Find the list of changed files.
FILES=`/usr/local/bin/svn st | grep ^M | /usr/bin/sed ‘s/^M[ ]*\(.*\)/\1/’`
for FILE in $FILES; do
# Invoke favorite diff viewer to see the changes.
svn diff –diff-cmd /Users/oleksii/Scripts/ $FILE

It could have been beautified a bit, but what a heck… BTW, the ‘magic’’ looks like the following for me (use any other diff tool if you like, I just happen to use DiffMerge because it is available for all the platforms I am using now):





It should not be difficult to see which OS I am using here :).