Diff for "Code/BzrSend"

Not logged in - Log In / Register

Differences between revisions 3 and 17 (spanning 14 versions)
Revision 3 as of 2008-12-17 21:14:27
Size: 3247
Editor: rockstar
Comment:
Revision 17 as of 2009-01-08 15:07:45
Size: 4573
Editor: abentley
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
submit_branch = bzr+ssh://bazaar.launchpad.net/~path-to/launchpad/trunk submit_branch = /home/rockstar/Projects/launchpad/trunk
Line 12: Line 12:
public_location = bzr+ssh://bazaar.launchpad.net/~rockstar/launchpad/
public_location:policy = appendpath
public_branch = bzr+ssh://bazaar.launchpad.net/~rockstar/launchpad/
public_branch:policy = appendpath
Line 15: Line 15:


[/home/rockstar/Projects/launchpad/trunk]
public_branch = bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/devel
Line 23: Line 27:
'''For thunderbird users:''' It's recommended that you tell bazaar about your mail client in ~/.bazaar/bazaar.conf = Client configuration =
Due to bug [[https://bugs.edge.launchpad.net/bzr/+bug/291847 | #291847]], it is necessary to specify your mail client on Intrepid.
Possible values include:
evolution, kmail, thunderbird, emacsclient, mutt
Line 25: Line 32:
If your client is not supported, you can use "editor".

e.g.
Line 29: Line 39:

== Claws ==

Bazaar's support for Claws is via xdg-utils, which is broken in Intrepid (see above). However, there is a tiny plugin that will will provide direct support for Claws:

{{{
cd ~/.bazaar/plugins
bzr branch lp:~allenap/+junk/bzr-claws claws
}}}

Don't forget to set `mail_client = claws` too.

This also fixes a small annoyance when using xdg-utils with Claws. If you ask xdg-email to attach a file to the email, Claws will pop up a modal dialog box to confirm that a file has indeed been attached.

Direct support for Claws is present in bzr.dev, and will be released in bzr 1.11
Line 35: Line 61:
bzr lpsend bzr push; bzr lpsend
Line 43: Line 69:
== Frequently Asked Questions == = Frequently Asked Questions =
Line 50: Line 76:
bzr send -no-bundles --mail-to merge@code.launchpad.net -r 1234..1239 bzr lpsend -r 1234..1239
Line 58: Line 84:
'''Answer:''' Launchpad's Loom support needs some work, and this doesn't make it better or worse. You can specify a diff between threads by doing '''Answer:''' Launchpad's Loom support needs some work, and this doesn't make it better or worse. However, you can specify a diff between threads by doing
Line 61: Line 87:
bzr send -r thread:..-1 bzr lpsend -r thread:..-1
Line 65: Line 91:
'''Question:''' Does this handle dependent branches. '''Question:''' Does this handle dependent branches?
Line 67: Line 93:
'''Answer:''' No, dependent branches are not currently supported for merge proposals. We do expect to resurrect the feature at some point. '''Answer:''' No, dependent branches are not currently supported for merge proposals. We do expect to resurrect the feature at some point, but it was much faster to start with the simple case.
Line 72: Line 98:
'''Answer:''' Not yet, but this is a planned feature. However, if you receive an email about the merge proposal being created, it will include the diff. '''Answer:''' Not yet, but this is a planned feature. However, if you receive an email about the merge proposal being created, it will include the diff as an attachment.
Line 77: Line 103:
'''Answer:''' lp: bzr+ssh:, sftp: and http: are all recognized. Remote URLs for Remote Branches and Mirrored Branches will work. '''Answer:''' lp:, bzr+ssh:, sftp: and http: are all recognized. Remote URLs for Remote Branches and Mirrored Branches will work.  Decorated versions, such as nosmart+bzr+ssh: will not work.
Line 82: Line 108:
'''Answer:''' Yes. As long as the target branch is represented on Launchpad, it will create RemoteBranch for the source branch if the source is not a Launchpad branch.
'''Answer:''' Yes. Launchpad will create !RemoteBranch for the source branch if the source is not represented on Launchpad. However, the target branch must be known to Launchpad.
Line 93: Line 118:

'''Question:''' Creating a new merge proposal via the web no longer creates multiple emails. Why does creating a new merge proposal via {{{bzr send}}} create multiple emails?

'''Answer:''' The API for sending a single email is not quite in sync with merge-proposal-by-email's needs. This is coming soon.

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

One-time set-up

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 = /home/rockstar/Projects/launchpad/trunk
push_location = bzr+ssh://bazaar.launchpad.net/~rockstar/launchpad/
push_location:policy = appendpath
public_branch = bzr+ssh://bazaar.launchpad.net/~rockstar/launchpad/
public_branch:policy = appendpath
submit_to = merge@code.launchpad.net


[/home/rockstar/Projects/launchpad/trunk]
public_branch = bzr+ssh://bazaar.launchpad.net/~launchpad-pqm/launchpad/devel

In bazaar.conf, add an entry to your aliases:

[ALIASES]
lpsend=send --no-bundle

Client configuration

Due to bug #291847, it is necessary to specify your mail client on Intrepid. Possible values include: evolution, kmail, thunderbird, emacsclient, mutt

If your client is not supported, you can use "editor".

e.g.

[DEFAULT]
mail_client = thunderbird

Claws

Bazaar's support for Claws is via xdg-utils, which is broken in Intrepid (see above). However, there is a tiny plugin that will will provide direct support for Claws:

cd ~/.bazaar/plugins
bzr branch lp:~allenap/+junk/bzr-claws claws

Don't forget to set mail_client = claws too.

This also fixes a small annoyance when using xdg-utils with Claws. If you ask xdg-email to attach a file to the email, Claws will pop up a modal dialog box to confirm that a file has indeed been attached.

Direct support for Claws is present in bzr.dev, and will be released in bzr 1.11

Creating a New Merge Proposal

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

bzr push; bzr lpsend

This will create a merge proposal and a diff and place them in your preferred email client to polish off and send to Launchpad. The body of your message will be used as the initial comment.

This example uses the lpsend alias, to ensure you specify --no-bundle. If you forget to supply --no-bundle, bzr send will not verify that your public branch is up-to-date. (Bundle support for Launchpad is coming soon.)

Frequently Asked Questions

Question: How do I specify revisions to generate the diff from?

Answer: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 lpsend -r 1234..1239

This will generate a diff from revno 1234 to 1239.

Question: Does this work with looms?

Answer: Launchpad's Loom support needs some work, and this doesn't make it better or worse. However, you can specify a diff between threads by doing

bzr lpsend -r thread:..-1

Question: Does this handle dependent branches?

Answer: No, dependent branches are not currently supported for merge proposals. We do expect to resurrect the feature at some point, but it was much faster to start with the simple case.

Question: Can I download the diff from the merge proposal in the web UI?

Answer: Not yet, but this is a planned feature. However, if you receive an email about the merge proposal being created, it will include the diff as an attachment.

Question: What URLs are recognized?

Answer: lp:, bzr+ssh:, sftp: and http: are all recognized. Remote URLs for Remote Branches and Mirrored Branches will work. Decorated versions, such as nosmart+bzr+ssh: will not work.

Question: Can I submit a branch that is not hosted on Launchpad?

Answer: Yes. Launchpad will create RemoteBranch for the source branch if the source is not represented on Launchpad. However, the target branch must be known to Launchpad.

Question: Should I use the --no-patch option to bzr send?

Answer: No. Launchpad uses that patch verbatim. If it's not present, LP cannot show a diff.

Question: What if I want to use my editor, like review-submit did?

Answer: You can configure Bazaar to use the "editor" mail client.

Question: Creating a new merge proposal via the web no longer creates multiple emails. Why does creating a new merge proposal via bzr send create multiple emails?

Answer: The API for sending a single email is not quite in sync with merge-proposal-by-email's needs. This is coming soon.

Code/BzrSend (last edited 2011-07-15 13:23:18 by bac)