Posts tagged svn
We have well over 100k lines of code in the core system right now, that’s not even counting all the supporting templates, images etc that is all over the place.
We run a hybrid system between Symfony 1.3 and Symfony 2.1, parts of our system is in the old Symfony and parts in the new Symfony2.
People always likes cool pictures (especially the kind that move), so I set off on a path to take our SVN repository of everything and visualise it.
Luckily for me, there’s already a tool to do this, called Gource. I have Gource 0.38 but it’s already at version 0.40 already with some nifty extra features.
Here’s the youtube video of the code as it progressed from 2007 up to August 2013. Can’t believe it’s been 6 years worth of development! http://www.youtube.com/watch?v=DojMulQ8CcI (Best viewed at HD-720p)
In order to do this, you go into your base-SVN folder and do the following commands:
svn log -r 1:HEAD --xml --verbose --quiet > gource-project-log.xml
gource -1280x720 \
--hash-seed 16 \
-seconds-per-day 0.01 \
--title "Afrihost SVN Repository" \
--hide dirnames,filenames,root \
--camera-mode overview \
--max-files 3000 \
--file-filter 'images|cache|log|/web' \
--bloom-intensity 0.2 \
--highlight-colour FF3030 \
--logo your_company_logo.png \
-o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 your-video.mp4
As you can see, it’s rather straight forward.
- Firstly you get the SVN log – this takes a while especially on a large project like this.
- Secondly you run the log (in XML format) through gource to create the video – you pipe the video to ffmpeg to make the mp4
- Lastly if you’d like, open it in iMovie and add sound to it, like I did.
Important to notice that you shouldn’t fiddle with the video while gource is running, because everything you do to the app while it runs is saved to the mp4. Just… be patient 🙂
You can find gource here: https://code.google.com/p/gource/
I just installed it with brew (in OSX), instructions can be found here: https://code.google.com/p/gource/wiki/MacSupport
Well, it was fun 🙂 And it looks pretty, so I guess it was worth the hour it took me 🙂