Code/BzrSend

Not logged in - Log In / Register

Revision 1 as of 2008-12-17 20:14:51

Clear message

As of Launchpad 2.1.12, Launchpad now supports creating merge proposals using bzr send.

Prerequisites

Please make sure you have your public and submit branches set properly. Below is an example ~/.bazaar/locations.conf

[/home/rockstar/Projects/launchpad/]
submit_branch = lp:~launchpad-pqm/launchpad/devel
push_location = lp:~rockstar/launchpad/
push_location:policy = appendpath

A few things to note: the branch locations are specified with with lp: (as opposed to the path lp: resolves to). Launchpad must know about the source branch from the merge proposal (meaning it has to be registered on Launchpad). If Launchpad doesn't know about the target branch, it will create a remote branch for it.

It's also recommended that you tell bazaar about your mail client in ~/.bazaar/bazaar.conf

[DEFAULT]
mail_client = thunderbird

Creating a New Merge Proposal

Once your environment is set up, bzr send is as easy as

bzr send --no-bundles --mail-to merge@code.launchpad.net

You'll want to specify --no-bundles so that bzr checks to make sure your public branch has all the revisions of your local branch. You can also tell bzr where to send emails in your ~/.bazaar/locations.conf Following along from the example above, the file snippet would read:

[/home/rockstar/Projects/launchpad/]
submit_branch = lp:~launchpad-pqm/launchpad/devel
push_location = lp:~rockstar/launchpad/
push_location:policy = appendpath
submit_to = merge@code.launchpad.net

Specifying revisions

When doing bzr submit, you may want to only generate a diff from a range of revisions. You can use -r parameter to specify the range, as below:

bzr send -no-bundles --mail-to merge@code.launchpad.net -r 1234..1239

This will generate a diff from revno 1234 to 1239.