Submit by mail

Martin Pool mbp at
Wed Jun 14 04:12:33 BST 2006

On 12/06/2006, at 3:40 AM, Hermann Kraus wrote:

> Hello!
> I'm working on this task: Now I  
> want to have
> some comments about how I should do this.
> To store the configuration data I want to add to new files to  
> the .bzr directory:
> x-submit-addressStores the default email address (similar to x- 
> pull, x-push-data)
> x-submit-message  Stores a message that is shown before one can  
> send a mail (can
> be disabled by the user) that contains information about what  
> mailinglist the
> message is going to, where to subscribe, special format  
> requirements, etc.

As Aaron said, it should go in branch.conf, for two reasons:

  - all branches under a particular directory (e.g. all bzr branches)  
can be sent to the same location without configuring them individually

  - different users may want to configure it separately

Having a default which does propagate with the branch might be  
useful, so that people can get a checkout and then immediately submit  

> There will be a submit command that sends to the default address if  
> no --mail
> parameter is given. --remember will store the address as the new  
> default address
> (like push). If --remember is given a --message-file parameter can  
> be given which
> overwrites x-submit-message.
> The mua command can be configured in bazaar.conf. If none is  
> specified a text-
> editor is launched and an internal mail command used. The bundle  
> will be stored in
> a temporary file and sent as and attachment.

OK.  To start with I suggest you just run sendmail; that won't do on  
Windows or some unixes, but it's enough to start with.  Make sure  
there's an easy way to cancel sending.

> From the original proposal: "To allow bzr branch to know how to set  
> the submit
> target, there should be a file in the .bzr/ directory indicating  
> the target. To
> allow for a different target for people who branch from me, versus  
> my default
> branch target, there should be 2 files. (.bzr/submit-to and .bzr/ 
> children-submit-
> to) bzr branch should be smart, such that when it creates a branch,  
> it will use
>  .bzr/children-submit-to if it is available."
> I can't see how this would be useful, but if someone can tell me a  
> situation where
> this makes sense I'll try my best to add it.

I wouldn't worry about that for now.

As discussed on the spec, you will need to find a base revision to  
know which revisions to submit.  It should be possible to give that  
with -r, but I think the overwhelmingly common case will be to give  
another branch location and find the common ancestor between the two.

My suggestion would be that you start by finding the ancestor with  
another branch and print out a bundle from that point on.  Then add  
the feature to show it in an editor, then possibly send it to a mail  

Also you should be able to do this as a plugin, rather than a bzr  


More information about the bazaar mailing list