I have to travel fairly often for work, and I need to keep track of certain projects. With the goal of automating everything in my life, I've set up mr, by the amazing Joey Hess, to mirror the version control repositories of those projects. I run mr from cron to make sure I always am at most a day behind. This way, when I need to leave, I don't need to manually mirror the trees.

To set this up, I did essentially the following:

  • mkdir ~/vcs-mirrors
  • cd ~/vcs-mirrors
  • bzr get http://whatever/trunk whatever.trunk
  • mr register whatever.trunk

First two steps are a one-time setup, last two steps are repeated for each brach or repository.

Additionally, my crontab contains this:

0 */12 * * * cd $HOME/vcs-mirrors && mr -j3 update

This does take some disk space, of course, but not enough to worry me.