Help

Gource is a software version control visualization tool and one of its unique features is that its pretty darn fast and support a multitude of version control systems including SVN.

It took me less than 10 minutes to get it up and running to visualize JBoss Tools and Hibernate svn checkout.

It took a little bit of insomnia to also add in automatic fetching of user images from community.jboss.org based on the committer names in the logs and I end up with something like this:

The still shot doesn't really make Gource justice so be sure to check out some of the example videos available from Gource.

If you want to try to run this on your own then here is the script I created for it (tested on cygwin but should work on other *nix variants too).

The Script

Requirements:

  • Gource for your platform
  • svn-gource.py (place it in the root directory of Gource)
  • svn
  • curl
  • Python
  • Cygwin (if on windows)

Update the GOURCE_HOME in the following (non-optimized, but working) shell-script and save it to gourcejboss.sh:

export GOURCE_HOME=/cygdrive/c/work/products/gource
echo Fetching SVN Log
svn log --verbose --xml > gource-svn.log

echo Convert svn log to gource log
python $GOURCE_HOME/svn-gource.py --filter-dirs gource-svn.log > gource-custom.log

echo Getting unique committers from log and preparing urls
gawk -F\| '{ print $2 }' gource-custom.log > gource-all.txt
sort gource-all.txt | uniq > gource-unique.txt

gawk -F\| '{ print "curl -o " $1 ".png http://community.jboss.org/profile-image-display.jspa?username=" $1 }' gource-unique.txt > gource-urls.txt

echo Fetching committer images from community.jboss.org
mkdir gource-img
cd gource-img
sh ../gource-urls.txt 
echo Removing images for users with errors/missing
grep -l "unexpected error" *.png | xargs -n1 -i rm {}
cd ..

echo Running gource
$GOURCE_HOME/gource --log-format custom --user-image-dir ./gource-img gource-custom.log

Now go into the root of the svn checkout you want to run gource on and run sh gourcejboss.sh and see the magic unfold.

Have fun and if you have a machine with enough diskspace/cpu to record a video, post the link!

1 comment:
 
19. Jan 2010, 07:54 CET | Link

I have a movie to show activity for last month for https://svn.jboss.org/repos/jbosstools/trunk here.

Enjoy :)

ReplyQuote
Post Comment