changeset 1220:8baa29e36b14

import: fix bug in mail-format detection
author mpm@selenic.com
date Thu, 08 Sep 2005 12:10:43 -0700
parents 56582bb2b869
children 89f899caecb5
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Sep 08 10:49:33 2005 -0700
+++ b/mercurial/commands.py	Thu Sep 08 12:10:43 2005 -0700
@@ -1049,7 +1049,8 @@
         hgpatch = False
         for line in file(pf):
             line = line.rstrip()
-            if not message and mailre.match(line) and not opts['force']:
+            if (not message and not hgpatch and
+                   mailre.match(line) and not opts['force']):
                 if len(line) > 35: line = line[:32] + '...'
                 raise util.Abort('first line looks like a '
                                  'mail header: ' + line)