hgext/patchbomb.py
changeset 39075 2161faf0d24b
parent 39072 cecb05c371f7
child 39141 2e578eced958
--- 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'))