Recent svn commit statistics

Posted by Mike on Jan 13th, 2010

Here’s a little script-fu that can help determine how many lines of code were added vs. deleted for a single Subversion commit.

#!/bin/bash
if [ -z "$1" ]; then
echo "usage: $0 revision"
exit
fi
 
REV=$1
 
# Execute a svn diff on the revision, and search the output for deleted lines
# (begin with a [...]