##// END OF EJS Templates
patchbomb: use progress helper...
Martin von Zweigbergk -
r38422:8ce3f91d default
parent child Browse files
Show More
@@ -751,6 +751,7 b' def email(ui, repo, *revs, **opts):'
751 sender = mail.addressencode(ui, sender, _charsets, opts.get('test'))
751 sender = mail.addressencode(ui, sender, _charsets, opts.get('test'))
752 sendmail = None
752 sendmail = None
753 firstpatch = None
753 firstpatch = None
754 progress = ui.makeprogress(_('sending'), unit=_('emails'), total=len(msgs))
754 for i, (m, subj, ds) in enumerate(msgs):
755 for i, (m, subj, ds) in enumerate(msgs):
755 try:
756 try:
756 m['Message-Id'] = genmsgid(m['X-Mercurial-Node'])
757 m['Message-Id'] = genmsgid(m['X-Mercurial-Node'])
@@ -791,8 +792,7 b' def email(ui, repo, *revs, **opts):'
791 if not sendmail:
792 if not sendmail:
792 sendmail = mail.connect(ui, mbox=mbox)
793 sendmail = mail.connect(ui, mbox=mbox)
793 ui.status(_('sending '), subj, ' ...\n')
794 ui.status(_('sending '), subj, ' ...\n')
794 ui.progress(_('sending'), i, item=subj, total=len(msgs),
795 progress.update(i, item=subj)
795 unit=_('emails'))
796 if not mbox:
796 if not mbox:
797 # Exim does not remove the Bcc field
797 # Exim does not remove the Bcc field
798 del m['Bcc']
798 del m['Bcc']
@@ -801,4 +801,4 b' def email(ui, repo, *revs, **opts):'
801 generator.flatten(m, 0)
801 generator.flatten(m, 0)
802 sendmail(sender_addr, to + bcc + cc, fp.getvalue())
802 sendmail(sender_addr, to + bcc + cc, fp.getvalue())
803
803
804 ui.progress(_('sending'), None)
804 progress.complete()
General Comments 0
You need to be logged in to leave comments. Login now