Mercurial > public > mercurial-scm > hg-stable
diff hgext/patchbomb.py @ 39075:2161faf0d24b
patchbomb: use native strings when determining attachment disposition
Differential Revision: https://phab.mercurial-scm.org/D4232
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 09 Aug 2018 21:57:46 -0400 |
parents | cecb05c371f7 |
children | 2e578eced958 |
line wrap: on
line diff
--- a/hgext/patchbomb.py Thu Aug 09 21:04:15 2018 -0400 +++ b/hgext/patchbomb.py Thu Aug 09 21:57:46 2018 -0400 @@ -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'))