~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2009-03-10 12:33:01 UTC
  • mto: This revision was merged to the branch mainline in revision 4130.
  • Revision ID: aaron@aaronbentley.com-20090310123301-ijo1c962wimkujh0
Push body support through bzr send.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4741
4741
               type=unicode),
4742
4742
        'revision',
4743
4743
        'message',
 
4744
        Option('body', help='Body for the email.', type=unicode),
4744
4745
        RegistryOption.from_kwargs('format',
4745
4746
        'Use the specified output format.',
4746
4747
        **{'4': 'Bundle format 4, Merge Directive 2 (default)',
4749
4750
 
4750
4751
    def run(self, submit_branch=None, public_branch=None, no_bundle=False,
4751
4752
            no_patch=False, revision=None, remember=False, output=None,
4752
 
            format='4', mail_to=None, message=None, **kwargs):
 
4753
            format='4', mail_to=None, message=None, body=None, **kwargs):
4753
4754
        return self._run(submit_branch, revision, public_branch, remember,
4754
4755
                         format, no_bundle, no_patch, output,
4755
 
                         kwargs.get('from', '.'), mail_to, message)
 
4756
                         kwargs.get('from', '.'), mail_to, message, body)
4756
4757
 
4757
4758
    def _run(self, submit_branch, revision, public_branch, remember, format,
4758
 
             no_bundle, no_patch, output, from_, mail_to, message):
 
4759
             no_bundle, no_patch, output, from_, mail_to, message, body):
4759
4760
        from bzrlib.revision import NULL_REVISION
4760
4761
        branch = Branch.open_containing(from_)[0]
4761
4762
        if output is None:
4855
4856
                    subject += revision.get_summary()
4856
4857
                basename = directive.get_disk_name(branch)
4857
4858
                mail_client.compose_merge_request(mail_to, subject,
4858
 
                                                  outfile.getvalue(), basename)
 
4859
                                                  outfile.getvalue(),
 
4860
                                                  basename, body)
4859
4861
        finally:
4860
4862
            if output != '-':
4861
4863
                outfile.close()