Created this handy tutorial to get you started using Bazaar Version Control System with Launchpad.
I needed a quick how to use Bazaar and launchpad tutorial to get my interns started with fixing Ubuntu bugs and put together this tutorial based on examples from Jay Pipes presentation A Contributor's Guide to Launchpad and Bazaar.
A Contributor's Guide to Launchpad and Bazaar
For the impatient, you can get started typing the commands. There is much more indepth information about Bazaar in the presentation and Bazaar documentation as well.
# Make a source repos for all projects
mkdir ~/repos
# Create new repos for software-center project
cd repos; bzr init-repo software-center
cd software-center/
# Get the truck of software-center
bzr branch lp:ubuntu/software-center trunk
# Pull in new revisions of truck
cd ~/repos/software-center/trunk/
bzr rebase
# Branch to work on new bug
bzr branch trunk bug538384-inaccessible-button
cd bug538384-inaccessible-button
# Hack away, review your diff and commit
bzr diff
bzr commit --fixes=lp:538384 -m 'Adds accessible name to features links button'
# Push to launchpad
bzr push lp:~arky/ubuntu/maverick/software-center/fixes-538384
Hi Arky,
ReplyDeleteI'm using Lucid Lynx's latest Bazaar version in its main repository (Bazaar 2.1.1), and I think something needs to be fixed on your post.
- bzr rebase gave the error ``bzr: ERROR: unknown command "rebase"'', I guess there's no need to rebase.
- There is a bug when you do the pushing with ``bzr push ...'' if the local repo version and the remote version are not compatible. It says ``KnitPackRepository('...') is not compatible with CHKInventoryRepository('...')''. The solution is to upgrade the remote version then do the pushing:
bzr upgrade lp:<name-of-your-repo>
bzr push lp:<name-of-your-repo>
The first command might not work if you are not the owner of the branch, but the second push command probably will. More about this bug at https://bugs.launchpad.net/bzr/+bug/450147
cmpitg
Yang the bzr rebase (provided by package bzr-rebase) lets you keep the local checkout in sync with main trunk source tree.
ReplyDeleteI run it every few hours to keep getting newer revisions of main branch. Thanks for the heads up, I haven't yet faced the bug you mentioned.
Oh, I see, bzr-rebase is a plugin of Bazaar. Thank you, Arky.
ReplyDeleteI got that bug when I was trying to re-branch tint2 trunk from Launchpad :-).