D4232: patchbomb: use native strings when determining attachment disposition
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Fri Aug 10 02:07:12 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/D4232
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
@@ -278,10 +278,11 @@
seqno=idx, total=total)
else:
patchname = cmdutil.makefilename(repo[node], '%b.patch')
- disposition = 'inline'
+ disposition = r'inline'
if opts.get('attach'):
- disposition = 'attachment'
- p['Content-Disposition'] = disposition + '; filename=' + patchname
+ disposition = r'attachment'
+ p[r'Content-Disposition'] = (
+ disposition + r'; filename=' + encoding.strfromlocal(patchname))
msg.attach(p)
else:
msg = mail.mimetextpatch(body, display=opts.get('test'))
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list