diff mercurial/patch.py @ 9576:c156bf947e26

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Sun, 11 Oct 2009 13:54:19 -0500
parents 4c041f1ee1b4 b8352a3617f3
children a981ddb16b80
line wrap: on
line diff
--- 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