Show More
@@ -62,7 +62,7 b' to send each message out:' | |||||
62 | That should be all. Now your patchbomb is on its way out.''' |
|
62 | That should be all. Now your patchbomb is on its way out.''' | |
63 |
|
63 | |||
64 | import os, errno, socket, tempfile, cStringIO |
|
64 | import os, errno, socket, tempfile, cStringIO | |
65 |
import email.MIMEMultipart, email. |
|
65 | import email.MIMEMultipart, email.MIMEBase | |
66 | import email.Utils, email.Encoders, email.Generator |
|
66 | import email.Utils, email.Encoders, email.Generator | |
67 | from mercurial import cmdutil, commands, hg, mail, patch, util |
|
67 | from mercurial import cmdutil, commands, hg, mail, patch, util | |
68 | from mercurial.i18n import _ |
|
68 | from mercurial.i18n import _ | |
@@ -180,7 +180,8 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
180 | if body: |
|
180 | if body: | |
181 | msg.attach(mail.mimeencode(ui, body, _charsets, |
|
181 | msg.attach(mail.mimeencode(ui, body, _charsets, | |
182 | opts.get('test'))) |
|
182 | opts.get('test'))) | |
183 |
p = |
|
183 | p = mail.mimetextpatch('\n'.join(patch), 'x-patch', | |
|
184 | opts.get('test')) | |||
184 | binnode = bin(node) |
|
185 | binnode = bin(node) | |
185 | # if node is mq patch, it will have patch file name as tag |
|
186 | # if node is mq patch, it will have patch file name as tag | |
186 | patchname = [t for t in repo.nodetags(binnode) |
|
187 | patchname = [t for t in repo.nodetags(binnode) | |
@@ -199,7 +200,7 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
199 | msg.attach(p) |
|
200 | msg.attach(p) | |
200 | else: |
|
201 | else: | |
201 | body += '\n'.join(patch) |
|
202 | body += '\n'.join(patch) | |
202 | msg = email.MIMEText.MIMEText(body) |
|
203 | msg = mail.mimetextpatch(body, display=opts.get('test')) | |
203 |
|
204 | |||
204 | subj = desc[0].strip().rstrip('. ') |
|
205 | subj = desc[0].strip().rstrip('. ') | |
205 | if total == 1: |
|
206 | if total == 1: |
General Comments 0
You need to be logged in to leave comments.
Login now