# HG changeset patch # User mpm@selenic.com # Date 1126206643 25200 # Node ID 8baa29e36b14afe9b3d0ef8fb630c93f8cdf107f # Parent 56582bb2b86975be2bac42031c2b42c8f8e5413b import: fix bug in mail-format detection diff --git a/mercurial/commands.py b/mercurial/commands.py --- 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)