A Beginner's Guide to Bazaar
Bazaar (or bzr) is a project of Canonical to develop an open source distributed version control system that is powerful, friendly, and scalable. ... It is used by Launchpad for managing revisions with packages. If you have never created a Launchpad project because bzr scared you, fear no more!
To get started, you should install the bzr application by running:
Bazaar relies on SSH keys to transfer files to your Launchpad account. If you don't have a SSH key, you can follow the next steps to get your SSH key on Launchpad. If you already have your SSH key on Launchpad, you can skip this section to "Using Bazaar".
sudo apt-get install bzr
Launchpad / SSH Key
To create your SSH key, open a terminal and run:
Leave the first prompt (for the key location) at default, by pressing Enter, then enter a passphrase for your private SSH key. When complete, run:
Copy your public key, from the previous command, then go to Launchpad to edit your SSH key:
Paste the key into "Add an SSH key" then click "Import Public Key". You should be all set now!
Suppose you found a project on Launchpad, that you wanted to help out with, or wanted to download their project source to tweak it to your own likings. I'll give my perlbot project as a quick example. If you go to:
You can view the trunk, and revisions for that project. If you wanted to download a copy of this trunk to your local system, you would issue this command:
This would then download the source files of perlbot to ~/perlbot on your system. You can then execute, run, or send the revisions back to the trunk (with proper permission).
bzr pull lp:perlbot
Ok. So let's say you want to start your own branch, where you can host your own edited version of some software, or it could be something you created by yourself that you want to be worked on by a team. Gather up all of the files you want to placed in your launchpad branch, and place them in one directory. cd to this directory, and then run:
This makes the directory into a version branch. If you take the time to notice, there is now a hidden directory called .bzr in here. This is where all the revisions, and files are stored to be used by bzr. Now, add all of the files to the branch:
It is a good idea to get in the habit of running the next command for checking the difference between your last revision and the current one. You shouldn't have to do this on your first time around, though.
With this next step, we are committing our edits into the current revision. It is a good idea to label your revisions with meaningful comments.
You may now upload your revision to your Launchpad branch. If the branch does not exist, it will be created. You can have multiple branches, so name them accordingly. This command may take a few minutes, but it is creating the branch, uploading your files, creating revisions and alot of other things.
bzr commit -m "Revision 1 Comment"
bzr push lp:~user/projectname/branchname
Make directory a bzr branch:
Download a branch:
Update a branch:
bzr pull <location>
Add files to branch:
bzr push <location>
Check the difference between revisions:
Commit the revision:
(These are just the basic commands. You can find the complete list of commands by running 'man bzr' in your terminal.)
bzr commit -m "Revision Comment"
Bzr - Ubuntu Wiki
Bazaar Official Website