##// END OF EJS Templates
make introductory message of patch series text/plain
Christian Ebert -
r2704:99e7cf6b default
parent child Browse files
Show More
@@ -188,8 +188,7 b' def patchbomb(ui, repo, *revs, **opts):'
188 if len(patches) > 1:
188 if len(patches) > 1:
189 ui.write(_('\nWrite the introductory message for the patch series.\n\n'))
189 ui.write(_('\nWrite the introductory message for the patch series.\n\n'))
190
190
191 msg = email.MIMEMultipart.MIMEMultipart()
191 subj = '[PATCH 0 of %d] %s' % (
192 msg['Subject'] = '[PATCH 0 of %d] %s' % (
193 len(patches),
192 len(patches),
194 opts['subject'] or
193 opts['subject'] or
195 prompt('Subject:', rest = ' [PATCH 0 of %d] ' % len(patches)))
194 prompt('Subject:', rest = ' [PATCH 0 of %d] ' % len(patches)))
@@ -204,11 +203,14 b' def patchbomb(ui, repo, *revs, **opts):'
204 if l == '.': break
203 if l == '.': break
205 body.append(l)
204 body.append(l)
206
205
207 msg.attach(email.MIMEText.MIMEText('\n'.join(body) + '\n'))
208
209 if opts['diffstat']:
206 if opts['diffstat']:
210 d = cdiffstat(_('Final summary:\n'), jumbo)
207 d = cdiffstat(_('Final summary:\n'), jumbo)
211 if d: msg.attach(email.MIMEText.MIMEText(d))
208 if d: body.append('\n' + d)
209
210 body = '\n'.join(body) + '\n'
211
212 msg = email.MIMEText.MIMEText(body)
213 msg['Subject'] = subj
212
214
213 msgs.insert(0, msg)
215 msgs.insert(0, msg)
214
216
General Comments 0
You need to be logged in to leave comments. Login now