Visualizing Your Project History with Gource

by Takashi Yoshida on May 24, 2010

in Programming

I recently came across an open source project called Gource through Gizmodo. Gource allows you to visualize commit history of software projects hosted by Git and Mercurial. It is maintained by Andrew Caudwell.

When I found out about Gource, I only knew it supported Git and Mercurial repositories. I later found out about support for Subversion and CVS through scripts, but I was not sure if it supported projects hosted by TFS at all. I thought I might be able to get Gource to work with TFS commit logs if I wrote a script for it.

Luckily for me, Mike Ashley has already developed an application that does just that. TFSConverter takes a few parameters from command line and spits out log files that Gource understands. I could not get TFSConverter to work with all projects initially, but I modified TFSConverter a bit and got it to work with all projects.

Gource-TFS.png

Now that I have Gource working with TFS commit logs, I am happily generating video files from the log files. I stumbled a little with FFmpeg and x264 encoding at first, but once I learned about -vpre option from robert.swain‘ blog, I got the ffmpeg to generate video from Gource’s output nicely.

gource --disable-progress --stop-at-end --output-ppm-stream - <project.log> | ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -vpre libx264-default <project.mp4>

You can replace -vpre option that suits your purpose better. You can see the available options at ${prefix}/share/ffmpeg. Mine is at /opt/local/share/ffmpeg. Yours might be somewhere else.

{ 2 comments }

Staffan June 10, 2010 at 7:16 pm

This sounds great!

Could you share your modifications to the TfsConverter to save me a few hours?

Takashi Yoshida June 10, 2010 at 10:36 pm

Hi Staffan.

You can get my modified code from my GitHub page.

Comments on this entry are closed.

Previous post:

Next post: