changeset 19513:9e8298a324ac stable

import: cut commit messages at --- unconditionally (issue2148) We used to do this based on X-mailer: mentioning git, but git doesn't put X-mailer in its git-format-patch output.
author Matt Mackall <mpm@selenic.com>
date Sat, 27 Jul 2013 19:31:14 -0500
parents f84036df71ad
children cfdae231ba78
files mercurial/patch.py tests/test-import.t
diffstat 2 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/patch.py	Sat Jul 27 21:16:12 2013 +0200
+++ b/mercurial/patch.py	Sat Jul 27 19:31:14 2013 -0500
@@ -176,7 +176,6 @@
             # 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
         nodeid = None
@@ -233,7 +232,7 @@
                             parents.append(line[9:].lstrip())
                         elif not line.startswith("# "):
                             hgpatchheader = False
-                    elif line == '---' and gitsendmail:
+                    elif line == '---':
                         ignoretext = True
                     if not hgpatchheader and not ignoretext:
                         cfp.write(line)
--- a/tests/test-import.t	Sat Jul 27 21:16:12 2013 +0200
+++ b/tests/test-import.t	Sat Jul 27 19:31:14 2013 -0500
@@ -345,7 +345,6 @@
   email patch
   
   next line
-  ---
   $ rm -r b