changeset 1211:1c455338ad95

Fold import -m option into import -f
author mpm@selenic.com
date Wed, 07 Sep 2005 20:09:16 -0700
parents 27f2ec705332
children ccb6201e3f28
files doc/hg.1.txt mercurial/commands.py
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/doc/hg.1.txt	Wed Sep 07 20:05:22 2005 -0700
+++ b/doc/hg.1.txt	Wed Sep 07 20:09:16 2005 -0700
@@ -251,10 +251,13 @@
 import [-p <n> -b <base> -f] <patches>::
     Import a list of patches and commit them individually.
 
+    If there are outstanding changes in the working directory, import
+    will abort unless given the -f flag.
+
     If a patch looks like a mail message (its first line starts with
     "From " or looks like an RFC822 header), it will not be applied
-    unless the -m option is used.  The importer neither parses nor
-    discards mail headers, so use -m only to override the "mailness"
+    unless the -f option is used.  The importer neither parses nor
+    discards mail headers, so use -f only to override the "mailness"
     safety check, not to import a real mail message.
 
     options:
@@ -262,7 +265,6 @@
                       meaning as the corresponding patch option
     -b <path>         base directory to read patches from
     -f, --force	      skip check for outstanding uncommitted changes
-    -m, --mail-like   apply a patch that appears to be a mail message
 
     aliases: patch
 
--- a/mercurial/commands.py	Wed Sep 07 20:05:22 2005 -0700
+++ b/mercurial/commands.py	Wed Sep 07 20:09:16 2005 -0700
@@ -1029,7 +1029,7 @@
         hgpatch = False
         for line in file(pf):
             line = line.rstrip()
-            if not message and mailre.match(line) and not opts['mail_like']:
+            if not message 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)
@@ -1683,8 +1683,7 @@
         (import_,
          [('p', 'strip', 1, 'path strip'),
           ('f', 'force', None, 'skip check for outstanding changes'),
-          ('b', 'base', "", 'base path'),
-          ('m', 'mail-like', None, 'apply a patch that looks like email')],
+          ('b', 'base', "", 'base path')],
          "hg import [-f] [-p NUM] [-b BASE] PATCH..."),
     "incoming|in": (incoming, 
          [('p', 'patch', None, 'show patch')],