Mathias Hasselmann

Postings by Mathias on June 16, 2007

Saving Bandwidth with git-svn

git-svn is a cool tool to have the joy of local branches and git's outstanding performance, whilest working with a Subversion repository. Unfortunatly git-svn has the disadvantage of wasting insane amounts of bandwidth when cloning a Subversion repository: Cloning for instance the GTK+ repository costs serveral gigs of bandwidth - just do end with about 200 MB of compressed data on your disk. It's told this happens due a bug in Subversion's language bindings the godfathers SVN did not care about yet - although patches exists.

Having just 5 GB per month to waste, this big appetite is a real problem, but fortunatly I realized how to deal with it:

  1. run git-svn clone on a machine with cheap internet connection, like for instance your virtual web server.
  2. call git repack on the cheap machine
  3. let rsync transfer the compressed repository to your home

This also should work for relocating a git-svn repository, when the URL of the SVN repo changed.

Update: Eric Wong - the maintainer of git-svn - has patched Subversion packages for Debian.