##// 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 def patchbomb(ui, repo, *revs, **opts):
188 188 if len(patches) > 1:
189 189 ui.write(_('\nWrite the introductory message for the patch series.\n\n'))
190 190
191 msg = email.MIMEMultipart.MIMEMultipart()
192 msg['Subject'] = '[PATCH 0 of %d] %s' % (
191 subj = '[PATCH 0 of %d] %s' % (
193 192 len(patches),
194 193 opts['subject'] or
195 194 prompt('Subject:', rest = ' [PATCH 0 of %d] ' % len(patches)))
@@ -204,11 +203,14 def patchbomb(ui, repo, *revs, **opts):
204 203 if l == '.': break
205 204 body.append(l)
206 205
207 msg.attach(email.MIMEText.MIMEText('\n'.join(body) + '\n'))
208
209 206 if opts['diffstat']:
210 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 215 msgs.insert(0, msg)
214 216
General Comments 0
You need to be logged in to leave comments. Login now