##// END OF EJS Templates
git-send-email compatibility: stop reading changelog after ^---$
Brendan Cully -
r4220:12537038 default
parent child Browse files
Show More
@@ -48,8 +48,6 b' def extract(ui, fileobj):'
48 48 fd, tmpname = tempfile.mkstemp(prefix='hg-patch-')
49 49 tmpfp = os.fdopen(fd, 'w')
50 50 try:
51 hgpatch = False
52
53 51 msg = email.Parser.Parser().parse(fileobj)
54 52
55 53 message = msg['Subject']
@@ -77,6 +75,9 b' def extract(ui, fileobj):'
77 75 payload = part.get_payload(decode=True)
78 76 m = diffre.search(payload)
79 77 if m:
78 hgpatch = False
79 ignoretext = False
80
80 81 ui.debug(_('found patch at byte %d\n') % m.start(0))
81 82 diffs_seen += 1
82 83 cfp = cStringIO.StringIO()
@@ -96,7 +97,9 b' def extract(ui, fileobj):'
96 97 ui.debug('From: %s\n' % user)
97 98 elif line.startswith("# Date "):
98 99 date = line[7:]
99 if not line.startswith('# '):
100 elif line == '---' and 'git-send-email' in msg['X-Mailer']:
101 ignoretext = True
102 if not line.startswith('# ') and not ignoretext:
100 103 cfp.write(line)
101 104 cfp.write('\n')
102 105 message = cfp.getvalue()
General Comments 0
You need to be logged in to leave comments. Login now