Bazaar for GNOME developers

** WORK IN PROGRESS **

For those who want to use Bazaar with GNOME, there is a machine (bzr-playground.gnome.org) where any GNOME contributor can publish Bazaar branches. Any hacker with GNOME subversion access should be able to access the machine using their usual SSH key. This machine runs a full mirror of GNOME svn into bzr. The log of the mirror process is available at http://bzr-playground.gnome.org/.mirror-log.

SSH Setup

If your GNOME user name differs from your local user name, you will need to edit ~/.ssh/config to add a stanza like:

If your user name differs, you will need to set the GNOME_USER environment variable for some scripts to function correctly:

You can check that this is all correct by executing bzr on the server:

Install Bazaar

you will need to install Bzr on your machine. Instructions for installing it on various distributions can be found here. You will need at least Bazaar 1.0, but later versions are preferred. For best performance, install 1.6b2.

Before making any commits, you should tell Bazaar what user ID to use. Traditionally an email address is used for this:

Grabbing a module

A helper script is available to help set up a Bazaar working environment locally. You can grab it with:

You can then check out a branch with e.g.:

If no branch name is provided, the name "devel" will be used. The script will do the following:

The files in ~/gnome-bzr/repos represent the local branch data, while the

So we can create a branch of Sound Juicer with:

You can then make your changes and commit them. The changes can be pushed to bzr-playground.gnome.org with the bzr push command. Your published branches can be browsed through the web at http://bzr-playground.gnome.org/~$user.

The bzr-gnome-setup.py script provides a suggested layout and workflow for using Bazaar, but others are possible. The tutorial and users guide are good places to start.

GUADEC

Due to the unreliable internet at the conference venue, we have set up a local box for use by GUADEC participants. If you are at GUADEC, you can use the local machine by setting the following environment variable:

We will migrate branches created on this machine at the close of the conference. This may overwrite branches of the same name though.

Working

Lets add a new i-am-luis filter to cheese. Lets branch trunk:

$ ./bzr-gnome-setup cheese auto-i-am-linux
$ cd ~/gnome-bzr/src/cheese

And now it's a lot like the SVN you know and love:

# add a file
vi i-am-luis.c
bzr add i-am-luis.c

You can check on what you've done:

bzr stat
bzr diff

Check it in to the branch

bzr ci -m "Commit message"

And then, when its done, push the branch so others can see:

bzr push

Merging

Some cool stuff landed in trunk, and we need it. Pull won't work, and tells you to merge. You can just do

You can merge again and again and Bazaar will "just work". How very GNOME of it, right? Unlike Subversion 1.4, which does no merge tracking, bzr-svn does track merges. So it knows what its merged in already. Yay.

Merging from Others

You can merge from other people who have published branches with the following command:

Getting stuff upstream

Todo

Bazaar (last edited 2008-07-23 01:57:32 by RobertCollins)