# HG changeset patch # User mpm@selenic.com # Date 1126148956 25200 # Node ID 1c455338ad95b50ae8ce36e64f91ec1a0ea94c53 # Parent 27f2ec70533263c4f93e251aeb8004285d50b247 Fold import -m option into import -f diff -r 27f2ec705332 -r 1c455338ad95 doc/hg.1.txt --- 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 -b -f] :: 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 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 diff -r 27f2ec705332 -r 1c455338ad95 mercurial/commands.py --- 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')],