# HG changeset patch # User Yuya Nishihara <y...@tcha.org> # Date 1523167380 -32400 # Sun Apr 08 15:03:00 2018 +0900 # Node ID 323e34785dacaad98d06dd3b15c2370779149e97 # Parent 9e3b46147b952770b7b10d626a745df8f3c1eeb1 py3: use system string to access email headers
diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -224,8 +224,8 @@ def extract(ui, fileobj): 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)) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel