I work on Launchpad, so I want people to know that Launchpad provides hosting for Bazaar branches. It uses an SFTP server I wrote with Twisted's Conch package to do a few things that would be tricky with OpenSSH.

James Henstridge blogged about using Launchpad to host your Bazaar branches. Although this isn't specific to Launchpad, there's one aspect of using Bazaar in that way that is worth emphasising: if you use checkouts, Bazaar uses exactly the same commands as Subversion. Here's what it looks like to checkout a branch (hosted on Launchpad because that's convenient example) and work on it with Bazaar:

    $ bzr checkout sftp://bazaar.launchpad.net/~teamname/product/branchname team-branch
    $ cd team-branch
    [...hack hack hack...]
    $ bzr commit
    bzr: ERROR: Bound branch BzrBranch5('file:///...') is out of date with
    master branch BzrBranch5('sftp://...').
    To commit to master branch, run update and then commit.
    You can also pass --local to commit to continue working disconnected.
    [Someone else has committed since we did "bzr checkout", so we need to update.]
    $ bzr update
    Text conflict in hello.txt
    1 conflicts encountered.
    Updated to revision 2.
    [...resolve conflicts...]
    $ bzr resolved fileA fileB
    $ bzr commit

If you replace "bzr" with "svn", it's exactly the same commands you'd use with svn (and the same short aliases are there too: "co", "ci", "up").

The biggest difference is that bzr checkout will download the full branch history (unless of course you checkout into a repository that already has some or all of it), so the initial checkout is likely to be a bit slower. (If you pass the --lightweight flag to checkout you avoid that, but it means you bzr will need to access the branch on the network for almost every operation.)

Oh, and the other difference is of course that bazaar is distributed — if you want to make a new branch locally to experiment on, you can. You can also commit to your checkout while disconnected, and merge the changes back to the parent branch when you get back online.

But I'm not trying to rewrite the Bazaar documentation in this blog entry. I just wanted to point out that using Bazaar doesn't have to mean learning unfamiliar commands and an unfamiliar way of working. You can have a simple workflow of 3 people that always commit to the one and only branch if that's all you need — Bazaar doesn't force each developer to have a logically seperate branch.

Some other related documentation links:

On a tangentially related note, jelmer's bzr-svn plugin sounds very nice. I need to set aside some time to play with this. I'd love to use Bazaar to work on Twisted.

Last modified: 09 October 2006

Powered by backwards