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

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

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.