Wednesday, September 09, 2009

 

bazaar and launchpad

Rockstar gave a TOTALLY AWESOME presentation during Ubuntu Developer Week on bzr and lp integration. The takeaway is this:

Bazaar can mirror a remote hosted repo into a local centralized branch. It then uses this central branch as the starting point for derived branches, even when hosted remotely. So instead of:

$ bzr branch lp:mago (downloads >1mb of crap)
$ bzr branch lp:~jtatum/mago/gconf (downloads >1mb of crap)

You do some config and:
$ bzr cbranch lp:mago (downloads >1mb of crap)
$ bzr cbranch lp:~jtatum/mago/gconf (downloads ~50kb of crap)

Magical!

~/.bazaar/bazaar.conf:
[ALIASES]
cbranch = cbranch --lightweight

~/.bazaar/locations.conf:
[/home/jtatum/Projects]
cbranch_target = /home/jtatum/Projects/repos
cbranch_target:policy = appendpath
[/home/jtatum/Projects/repos]
push_location = lp:~jtatum
push_location:policy = appendpath
public_branch = lp:~jtatum
public_branch:policy = appendpath

$ mkdir ~/Projects/repos/mago
$ cd ~/Projects/repos/mago
$ bzr init-repo --no-trees .
$ mkdir ~/Projects/mago
$ bzr cbranch lp:mago

Then, pull down a branch:

$ bzr cbranch lp:~who/mago/whatever

Or make a new one:

$ bzr cbranch mago myawesomecode

Push works magically thanks to the shorthand in location.conf. Neato!

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?