comparison mercurial/commands.py @ 1211:1c455338ad95

Fold import -m option into import -f
author mpm@selenic.com
date Wed, 07 Sep 2005 20:09:16 -0700
parents 920682a532df
children ccb6201e3f28
comparison
equal deleted inserted replaced
1210:27f2ec705332 1211:1c455338ad95
1027 message = [] 1027 message = []
1028 user = None 1028 user = None
1029 hgpatch = False 1029 hgpatch = False
1030 for line in file(pf): 1030 for line in file(pf):
1031 line = line.rstrip() 1031 line = line.rstrip()
1032 if not message and mailre.match(line) and not opts['mail_like']: 1032 if not message and mailre.match(line) and not opts['force']:
1033 if len(line) > 35: line = line[:32] + '...' 1033 if len(line) > 35: line = line[:32] + '...'
1034 raise util.Abort('first line looks like a ' 1034 raise util.Abort('first line looks like a '
1035 'mail header: ' + line) 1035 'mail header: ' + line)
1036 if diffre.match(line): 1036 if diffre.match(line):
1037 break 1037 break
1681 "identify|id": (identify, [], 'hg identify'), 1681 "identify|id": (identify, [], 'hg identify'),
1682 "import|patch": 1682 "import|patch":
1683 (import_, 1683 (import_,
1684 [('p', 'strip', 1, 'path strip'), 1684 [('p', 'strip', 1, 'path strip'),
1685 ('f', 'force', None, 'skip check for outstanding changes'), 1685 ('f', 'force', None, 'skip check for outstanding changes'),
1686 ('b', 'base', "", 'base path'), 1686 ('b', 'base', "", 'base path')],
1687 ('m', 'mail-like', None, 'apply a patch that looks like email')],
1688 "hg import [-f] [-p NUM] [-b BASE] PATCH..."), 1687 "hg import [-f] [-p NUM] [-b BASE] PATCH..."),
1689 "incoming|in": (incoming, 1688 "incoming|in": (incoming,
1690 [('p', 'patch', None, 'show patch')], 1689 [('p', 'patch', None, 'show patch')],
1691 'hg incoming [-p] [SOURCE]'), 1690 'hg incoming [-p] [SOURCE]'),
1692 "^init": (init, [], 'hg init [DEST]'), 1691 "^init": (init, [], 'hg init [DEST]'),