mercurial/patch.py
changeset 37468 ef661ce45cdb
parent 37463 bbd240f81ac5
child 37471 51d5e1ff0613
--- a/mercurial/patch.py	Sun Apr 08 14:59:12 2018 +0900
+++ b/mercurial/patch.py	Sun Apr 08 15:03:00 2018 +0900
@@ -224,8 +224,8 @@
     try:
         msg = pycompat.emailparser().parse(fileobj)
 
-        subject = msg['Subject'] and mail.headdecode(msg['Subject'])
-        data['user'] = msg['From'] and mail.headdecode(msg['From'])
+        subject = msg[r'Subject'] and mail.headdecode(msg[r'Subject'])
+        data['user'] = msg[r'From'] and mail.headdecode(msg[r'From'])
         if not subject and not data['user']:
             # Not an email, restore parsed headers if any
             subject = '\n'.join(': '.join(map(encoding.strtolocal, h))