Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/patchbomb.py @ 3889:57b797601b61
Merge with crew
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 14 Dec 2006 15:55:46 -0600 |
parents | ff49da8bd6ae abaee83ce0a6 |
children | 6b4127c7d52a |
comparison
equal
deleted
inserted
replaced
3886:abaee83ce0a6 | 3889:57b797601b61 |
---|---|
213 bcc = opts['bcc'] or (ui.config('email', 'bcc') or | 213 bcc = opts['bcc'] or (ui.config('email', 'bcc') or |
214 ui.config('patchbomb', 'bcc') or '').split(',') | 214 ui.config('patchbomb', 'bcc') or '').split(',') |
215 bcc = [a.strip() for a in bcc if a.strip()] | 215 bcc = [a.strip() for a in bcc if a.strip()] |
216 | 216 |
217 if len(patches) > 1: | 217 if len(patches) > 1: |
218 ui.write(_('\nWrite the introductory message for the patch series.\n\n')) | |
219 | |
220 tlen = len(str(len(patches))) | 218 tlen = len(str(len(patches))) |
221 | 219 |
222 subj = '[PATCH %0*d of %d] %s' % ( | 220 subj = '[PATCH %0*d of %d] %s' % ( |
223 tlen, 0, | 221 tlen, 0, |
224 len(patches), | 222 len(patches), |
225 opts['subject'] or | 223 opts['subject'] or |
226 prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0, | 224 prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0, |
227 len(patches)))) | 225 len(patches)))) |
228 | 226 |
229 ui.write(_('Finish with ^D or a dot on a line by itself.\n\n')) | 227 body = '' |
230 | |
231 body = [] | |
232 | |
233 while True: | |
234 try: l = raw_input() | |
235 except EOFError: break | |
236 if l == '.': break | |
237 body.append(l) | |
238 | |
239 if opts['diffstat']: | 228 if opts['diffstat']: |
240 d = cdiffstat(_('Final summary:\n'), jumbo) | 229 d = cdiffstat(_('Final summary:\n'), jumbo) |
241 if d: body.append('\n' + d) | 230 if d: body = '\n' + d |
242 | 231 |
243 body = '\n'.join(body) + '\n' | 232 ui.write(_('\nWrite the introductory message for the patch series.\n\n')) |
233 body = ui.edit(body, sender) | |
244 | 234 |
245 msg = email.MIMEText.MIMEText(body) | 235 msg = email.MIMEText.MIMEText(body) |
246 msg['Subject'] = subj | 236 msg['Subject'] = subj |
247 | 237 |
248 msgs.insert(0, msg) | 238 msgs.insert(0, msg) |