Discovered gource the day before yesterday. Want! In the office! In realtime!
sudo apt-get install gource
Gource can read the logs from existing repositories.
But to continuosly feed it with incoming revisions, we’ll attach a post-commit hook to the SVN repository that creates a custom log format, which is then written to a file as the changes come in.
Add to or execute from /hooks/post-commit in your svn server directory:
#!/bin/sh
REPOS="$1"
REV="$2"
# COLOR=FFFFFF
AUTHOR=`svnlook author --revision $REV $REPOS`
TIME=`date +%s`
CUSTOMLOGFILE=/home/fusselwurm/svn-gource.log
svnlook changed --revision $REV $REPOS | while read line; do
STATE_FILES=`echo $line | sed -E 's/\s+/|/' -`
LOGLINE="$TIME|$AUTHOR|$STATE_FILES" # |$COLOR"
echo "$LOGLINE" >> "$CUSTOMLOGFILE"
done;
Right. Now pipe the log file’s contents to gource:
tail -F /home/fusselwurm/svn-gource.log | \ gource --log-format custom -200x200 -
Yay!
