Not logged in - Log In / Register

Revision 2 as of 2008-09-10 14:00:02

Clear message

DRAFT: this page is a work in progress. Please seek further help or check the wiki index for a complete page on this topic.


The combination of Bazaar branch hosting and Launchpad's teams infrastructure gives you a very powerful capability to collaborate on code. Essentially, you can push a branch into a shared space and anyone on that team can then commit to the branch.

This means that you can use Bazaar in the same way that you would use something like SVN, i.e. centrally hosting a branch that many people commit to. You have the added benefit, though, that anyone outside the team can always create their own personal branch of your team branch and, if they choose, upload it back to Launchpad.

However, Bazaar is flexible enough that you can choose your own workflow.

Creating your team branch

Registering a team branch works the same way as registering a personal branch: visit your team's code overview page, click Register a branch, then follow the instructions.

Next, you need to make the first push up to Launchpad. Again, this works just the same as with a personal branch.

Choosing a workflow

When you're working with a team branch, you can choose one of three workflows:

If you're not sure which workflow would best suit your team, there's more about Bazaar workflows in the Bazaar documentation. However, you may find that you need to experiment before you settle on one that works for your team.

Centralised (or lock-step)

A team using the centralised workflow might work something like this:

To make the initial check-out of a team branch, you need to open a terminal and type:

 $ bzr checkout lp:team-name/project-name/branch-name

Bazaar will now download just enough information to enable you to work on the code: i.e. the branch's working tree without its revision history.

When you're ready to send your work back to the branch, you commit in the usual way:

 $ bzr commit -m "Enter a commit message here"

The difference here is that Bazaar pushes your commit directly back up to Launchpad, rather than making the commit to a local branch on your computer.

As we saw in the example above, it's entirely possible that someone else may have made a commit to the team branch during the time between your check-out and when you're ready to make your commit. If that's the case, Bazaar will tell you and you'll need to pull down the latest version by typing:

 $ bzr update

During the update, Bazaar will merge the latest version of the branch into your local working tree. Although Bazaar has excellent support for merging, you may find some conflicts.


With a centralised workflow, each developer checks-out the team branch and makes their commits straight back to then commits their work back

A checkout is essentially just the working code tree, without all the branch history, because the branch history stays on the central server.

When using Bazaar in this fashion it behaves very similarly to SVN. You cannot commit locally, because the knowledge of your branch history is on the remote server. But it does mean that you use less space locally, because you don't need to store all of that history locally too.

Getting started with an existing team branch

If you're new to a team and want to start

Centralised (lock-step)

Instructional text

Where appropriate, use step by step instructions:

Step 1: Give concise and unambiguous instructions.

Step 2: Try not to state the obvious, unless you're writing for a novice user.

{i} Note: Highlight important information with a note.

Step 3: Use a well cropped screen shot if it will help orient the reader. Don't let the screen shot replace instructional text: not everyone can see your screen shot. Don't worry about borders or annotation for small, cropped screen shots such as this.

{i} Warning: If you're about to tell the reader to delete or otherwise change something that would be hard to restore, warn them.

Full screen shots

Describe the screen shot here

Some screen shots will be better placed to the right of your text. As they're not placed directly below the text that they support, use a border and short description.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam sagittis. Aliquam eros dui, scelerisque id, consequat in, accumsan vitae, pede. Suspendisse neque ligula, scelerisque ac, mattis ut, aliquam quis, odio.

Proin nunc nisi, fringilla ac, congue ac, luctus eu, lacus. Maecenas ac purus. Cras felis metus, ultricies non, euismod ac, accumsan eleifend, leo. Quisque imperdiet tempus tellus.

Ut euismod, diam nec adipiscing interdum, tortor orci fringilla nisi, vel blandit erat magna at nisi. Fusce hendrerit odio non metus. Mauris nisl massa, dapibus id, feugiat quis, blandit a, quam. Integer tincidunt feugiat nunc. Curabitur iaculis egestas elit. Nam imperdiet suscipit odio.