diff -r 7e03423def3c -r c156bf947e26 mercurial/patch.py --- a/mercurial/patch.py Thu Oct 08 01:17:48 2009 -0500 +++ b/mercurial/patch.py Sun Oct 11 13:54:19 2009 -0500 @@ -63,6 +63,10 @@ subject = msg['Subject'] user = msg['From'] + if not subject and not user: + # Not an email, restore parsed headers if any + subject = '\n'.join(': '.join(h) for h in msg.items()) + '\n' + gitsendmail = 'git-send-email' in msg.get('X-Mailer', '') # should try to parse msg['Date'] date = None