comparison mercurial/commands.py @ 1220:8baa29e36b14

import: fix bug in mail-format detection
author mpm@selenic.com
date Thu, 08 Sep 2005 12:10:43 -0700
parents cde6818e082a
children 89f899caecb5
comparison
equal deleted inserted replaced
1219:56582bb2b869 1220:8baa29e36b14
1047 message = [] 1047 message = []
1048 user = None 1048 user = None
1049 hgpatch = False 1049 hgpatch = False
1050 for line in file(pf): 1050 for line in file(pf):
1051 line = line.rstrip() 1051 line = line.rstrip()
1052 if not message and mailre.match(line) and not opts['force']: 1052 if (not message and not hgpatch and
1053 mailre.match(line) and not opts['force']):
1053 if len(line) > 35: line = line[:32] + '...' 1054 if len(line) > 35: line = line[:32] + '...'
1054 raise util.Abort('first line looks like a ' 1055 raise util.Abort('first line looks like a '
1055 'mail header: ' + line) 1056 'mail header: ' + line)
1056 if diffre.match(line): 1057 if diffre.match(line):
1057 break 1058 break