Development Team home

Set up Bazaar

Install the bzr package.

sudo apt-get install bzr

Tell Bazaar about yourself.

bzr whoami "Joe Black <>"

Tell it about our bug tracker: add the following line to ~/.bazaar/bazaar.conf.

bugtracker_sv_url ={id}

Getting the code

To get a local copy of the code from our Bazaar repositories:

bzr branch bzr://<branch name>/

So for the Debderiver code that would be:

bzr branch bzr://

Note that some repositories are in a deeper level. You need to prepend a subdirectory name to the branch name for those:

bzr branch bzr://

General workflow

This explains the decentralized with shared mainline workflow.

Let's start by setting up a working area for local branches.

mkdir -p ~/dev/gns/bzr/mychanges
cd ~/dev/gns/bzr

We'll be working with multiple copies of the same code, so we want to store them efficiently.

bzr init-repo .

Let's say we want to blacklist a package. First, we make a local copy of Debderiver. This mirror branch will be the link between the central branch on the remote server and our local changes.

bzr branch bzr://

Then we make a so-called feature branch. This is the branch we'll be working in.

bzr branch debderiver mychanges/debderiver
cd mychanges/debderiver

Now we make the changes we want, in this case adding a package to the blacklist (replace vim with your favorite editor).

vim examples/filters/parkes.yaml

If you create new files, don't forget to tell Bazaar about this.

bzr add path/to/file

Review your change before committing.

bzr status
bzr diff

If you're happy with it, commit. Please commit separately for each feature. If you want to blacklist 2 packages, do 1 commit for each (or better yet, make a feature branch for each). Include the number of the Savannah bug report if that's relevant.

bzr commit --fixes sv:123456 -m "Blacklist blobgoblin."

When we're done with our feature branch we can merge it into our mirror branch. To minimize conflicts when we upload to the remote server later, we pull in the latest changes before the merge.

cd ../../debderiver
bzr pull
bzr merge ../mychanges/debderiver

Resolve any conflicts that may arise. Next, we commit the changes in the mirror branch. If we made just one commit in our feature branch, then we use the same commit message. If we did multiple commits to implement the feature, then we use a summary commit message.

bzr commit --fixes sv:123456 -m "Blacklist blobgoblin."

To finish off, we push our changes to the central branch. Replace username with your Savannah user name.

bzr push bzr+ssh://

Bazaar will remember the URL when you first push. Next time you want to upload, you can just use bzr push without specifying the central branch location. If you get an error message saying "Permission denied (publickey)", then you first have to set an SSH public key in Savannah first.

Pushing only works if you are a member of the gNewSense group. If you're not and you want to help anyway, then you can create a merge directive.

bzr send -o ../../123456_blacklist_blobgoblin.bzr -m "Blacklist blobgoblin. (SV #123456)" bzr://

Attach the 123456_blacklist_blobgoblin.bzr file to the bug report or send it to the gnewsense-dev mailing list.

Official branches



DevelopmentTeam/Bazaar (last edited 2014-01-01 22:46:37 by samgee2)