D4223: patchbomb: use native strs for email header keys and values
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Aug 9 22:33:52 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4223
AFFECTED FILES
hgext/patchbomb.py
CHANGE DETAILS
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -378,8 +378,8 @@
datapart = emimebase.MIMEBase('application', 'x-mercurial-bundle')
datapart.set_payload(bundle)
bundlename = '%s.hg' % opts.get(r'bundlename', 'bundle')
- datapart.add_header('Content-Disposition', 'attachment',
- filename=bundlename)
+ datapart.add_header(r'Content-Disposition', r'attachment',
+ filename=encoding.strfromlocal(bundlename))
emailencoders.encode_base64(datapart)
msg.attach(datapart)
msg['Subject'] = mail.headencode(ui, subj, _charsets, opts.get(r'test'))
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list