496 files. |
495 files. |
497 |
496 |
498 With -n/--test, all steps will run, but mail will not be sent. |
497 With -n/--test, all steps will run, but mail will not be sent. |
499 You will be prompted for an email recipient address, a subject and |
498 You will be prompted for an email recipient address, a subject and |
500 an introductory message describing the patches of your patchbomb. |
499 an introductory message describing the patches of your patchbomb. |
501 Then when all is done, patchbomb messages are displayed. If the |
500 Then when all is done, patchbomb messages are displayed. |
502 PAGER environment variable is set, your pager will be fired up once |
|
503 for each patchbomb message, so you can verify everything is alright. |
|
504 |
501 |
505 In case email sending fails, you will find a backup of your series |
502 In case email sending fails, you will find a backup of your series |
506 introductory message in ``.hg/last-email.txt``. |
503 introductory message in ``.hg/last-email.txt``. |
507 |
504 |
508 The default behavior of this command can be customized through |
505 The default behavior of this command can be customized through |
717 if replyto: |
714 if replyto: |
718 m['Reply-To'] = ', '.join(replyto) |
715 m['Reply-To'] = ', '.join(replyto) |
719 if opts.get('test'): |
716 if opts.get('test'): |
720 ui.status(_('displaying '), subj, ' ...\n') |
717 ui.status(_('displaying '), subj, ' ...\n') |
721 ui.flush() |
718 ui.flush() |
722 if 'PAGER' in encoding.environ and not ui.plain(): |
719 ui.pager('email') |
723 fp = util.popen(encoding.environ['PAGER'], 'w') |
720 generator = emailmod.Generator.Generator(ui, mangle_from_=False) |
724 else: |
|
725 fp = ui |
|
726 generator = emailmod.Generator.Generator(fp, mangle_from_=False) |
|
727 try: |
721 try: |
728 generator.flatten(m, 0) |
722 generator.flatten(m, 0) |
729 fp.write('\n') |
723 ui.write('\n') |
730 except IOError as inst: |
724 except IOError as inst: |
731 if inst.errno != errno.EPIPE: |
725 if inst.errno != errno.EPIPE: |
732 raise |
726 raise |
733 if fp is not ui: |
|
734 fp.close() |
|
735 else: |
727 else: |
736 if not sendmail: |
728 if not sendmail: |
737 sendmail = mail.connect(ui, mbox=mbox) |
729 sendmail = mail.connect(ui, mbox=mbox) |
738 ui.status(_('sending '), subj, ' ...\n') |
730 ui.status(_('sending '), subj, ' ...\n') |
739 ui.progress(_('sending'), i, item=subj, total=len(msgs), |
731 ui.progress(_('sending'), i, item=subj, total=len(msgs), |