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