mercurial/commands.py
changeset 1220 8baa29e36b14
parent 1218 cde6818e082a
child 1221 89f899caecb5
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1049,7 +1049,8 @@ def import_(ui, repo, patch1, *patches, 
         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)