hgext/patchbomb.py
changeset 4886 2f09df302f30
parent 4730 eadfaa9ec487
child 5472 23889160905a
equal deleted inserted replaced
4885:d77accdd236e 4886:2f09df302f30
   304             body = ''
   304             body = ''
   305             if opts['diffstat']:
   305             if opts['diffstat']:
   306                 d = cdiffstat(_('Final summary:\n'), jumbo)
   306                 d = cdiffstat(_('Final summary:\n'), jumbo)
   307                 if d: body = '\n' + d
   307                 if d: body = '\n' + d
   308 
   308 
   309             ui.write(_('\nWrite the introductory message for the patch series.\n\n'))
   309             if opts['desc']:
   310             body = ui.edit(body, sender)
   310                 body = open(opts['desc']).read()
       
   311             else:
       
   312                 ui.write(_('\nWrite the introductory message for the '
       
   313                            'patch series.\n\n'))
       
   314                 body = ui.edit(body, sender)
   311 
   315 
   312             msg = email.MIMEText.MIMEText(body)
   316             msg = email.MIMEText.MIMEText(body)
   313             msg['Subject'] = subj
   317             msg['Subject'] = subj
   314 
   318 
   315             msgs.insert(0, msg)
   319             msgs.insert(0, msg)
   415          [('a', 'attach', None, _('send patches as inline attachments')),
   419          [('a', 'attach', None, _('send patches as inline attachments')),
   416           ('', 'bcc', [], _('email addresses of blind copy recipients')),
   420           ('', 'bcc', [], _('email addresses of blind copy recipients')),
   417           ('c', 'cc', [], _('email addresses of copy recipients')),
   421           ('c', 'cc', [], _('email addresses of copy recipients')),
   418           ('d', 'diffstat', None, _('add diffstat output to messages')),
   422           ('d', 'diffstat', None, _('add diffstat output to messages')),
   419           ('', 'date', '', _('use the given date as the sending date')),
   423           ('', 'date', '', _('use the given date as the sending date')),
       
   424           ('', 'desc', '', _('use the given file as the series description')),
   420           ('g', 'git', None, _('use git extended diff format')),
   425           ('g', 'git', None, _('use git extended diff format')),
   421           ('f', 'from', '', _('email address of sender')),
   426           ('f', 'from', '', _('email address of sender')),
   422           ('', 'plain', None, _('omit hg patch header')),
   427           ('', 'plain', None, _('omit hg patch header')),
   423           ('n', 'test', None, _('print messages that would be sent')),
   428           ('n', 'test', None, _('print messages that would be sent')),
   424           ('m', 'mbox', '',
   429           ('m', 'mbox', '',