Mercurial > public > mercurial-scm > hg
diff hgext/patchbomb.py @ 5973:ea77f6f77514
patchbomb: undo backout and fix bugs in the earlier patch
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 31 Jan 2008 14:44:19 -0600 |
parents | 597d8402087d |
children | f89fd07fc51d |
line wrap: on
line diff
--- a/hgext/patchbomb.py Tue Jan 22 23:07:23 2008 +0100 +++ b/hgext/patchbomb.py Thu Jan 31 14:44:19 2008 -0600 @@ -381,6 +381,7 @@ parent = None sender_addr = email.Utils.parseaddr(sender)[1] + sendmail = None for m in msgs: try: m['Message-Id'] = genmsgid(m['X-Mercurial-Node']) @@ -425,10 +426,12 @@ fp.write('\n\n') fp.close() else: + if not sendmail: + sendmail = mail.connect(ui) ui.status('Sending ', m['Subject'], ' ...\n') # Exim does not remove the Bcc field del m['Bcc'] - mail.sendmail(ui, sender, to + bcc + cc, m.as_string(0)) + sendmail(sender, to + bcc + cc, m.as_string(0)) cmdtable = { "email":