Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ for more details.
A friend of mine showed me a video he made with Gource, so this got me interested in seeing how the two major repositories that I have been contributing for years now have evolved over time. So I decided to get this tool myself and give it a shot. It's amazing to see how a Subversion repository evolved over the life of a project and this is an awesome tool to help do just that.

In a nutshell what Gource aims to do is give you a visual history of your source control repository. From their own site: Gource is a software version control visualization tool.

This is what a still capture of the output looks like for one of my repositories:
gource2.png


The compiled versions of Gource are for Windows only, so I had to build it myself, but before that could happen, I had to get either MacPorts or Home Brew. I went with the latter option. There is a nice Mac Support page on the Gource Wiki that explains what to do.

This is what I did on the command line:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
brew install gource


When everything is finished, this is what you should have:
gource1.png


I was going to run Gource on two SVN repositories, so I had a quick read of the SVN Wiki Page. From here I decided that it would be best to generate the log up front and then play around with Gource itself.

So that's what I did, I got my SVN log like this:
svn log -r 1:HEAD --xml --verbose --quiet > my-project-log.xml


...then after playing around with various options I settled on the following for Gource:
gource --hide filenames,dirnames,usernames -c 4 -i 1200 --seconds-per-day 1 --camera-mode overview --bloom-multiplier 0.25 --bloom-intensity 0.25 -1280x720 my-project-log.xml


Seeing directory names and file names is great the first time you run Gource, but these get in the way eventually, also I didn't want to show these publicly so they had to be hidden. I made the user names hidden too. The simulation is 4x faster the default and the files are set to expire 1200 seconds after being shown instead of the default 60, this is so that I could see the whole repository the entire time, not just the recent changes. I also reduced the bloom effect because it really just gets in the way. I've played with the camera mode and made two videos, one using overview and one tracking; the overview mode zooms the whole repository so it's visible in one hit, the tracking mode follows the changes in the simulation, so is a bit jumpy.



When it came to creating the videos, I had to install FFMPEG:
brew install ffmpeg


...then I ran Gource again with FFMPEG to generate my video:
gource --hide filenames,dirnames,usernames -c 4 -i 1200 --seconds-per-day 1 --camera-mode track --bloom-multiplier 0.25 --bloom-intensity 0.25 -1280x720 -o - my-project-log.xml | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4


These are the results -

This video shows the tracking camera mode.



This video shows the overview camera mode.



-i

Skip down to comments...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
 
comments powered by Disqus
Other posts you may like...