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)',
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)
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)
4860
4862
if output != '-':
4861
4863
outfile.close()