Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/patchbomb.py @ 3878:59ec9c38f614
merge with crew
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 14 Dec 2006 13:30:47 +0100 |
parents | ff49da8bd6ae |
children | 79e5a6e7c451 |
comparison
equal
deleted
inserted
replaced
3877:5f05157bf9be | 3878:59ec9c38f614 |
---|---|
214 bcc = opts['bcc'] or (ui.config('email', 'bcc') or | 214 bcc = opts['bcc'] or (ui.config('email', 'bcc') or |
215 ui.config('patchbomb', 'bcc') or '').split(',') | 215 ui.config('patchbomb', 'bcc') or '').split(',') |
216 bcc = [a.strip() for a in bcc if a.strip()] | 216 bcc = [a.strip() for a in bcc if a.strip()] |
217 | 217 |
218 if len(patches) > 1: | 218 if len(patches) > 1: |
219 ui.write(_('\nWrite the introductory message for the patch series.\n\n')) | |
220 | |
221 tlen = len(str(len(patches))) | 219 tlen = len(str(len(patches))) |
222 | 220 |
223 subj = '[PATCH %0*d of %d] %s' % ( | 221 subj = '[PATCH %0*d of %d] %s' % ( |
224 tlen, 0, | 222 tlen, 0, |
225 len(patches), | 223 len(patches), |
226 opts['subject'] or | 224 opts['subject'] or |
227 prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0, | 225 prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0, |
228 len(patches)))) | 226 len(patches)))) |
229 | 227 |
230 ui.write(_('Finish with ^D or a dot on a line by itself.\n\n')) | 228 body = '' |
231 | |
232 body = [] | |
233 | |
234 while True: | |
235 try: l = raw_input() | |
236 except EOFError: break | |
237 if l == '.': break | |
238 body.append(l) | |
239 | |
240 if opts['diffstat']: | 229 if opts['diffstat']: |
241 d = cdiffstat(_('Final summary:\n'), jumbo) | 230 d = cdiffstat(_('Final summary:\n'), jumbo) |
242 if d: body.append('\n' + d) | 231 if d: body = '\n' + d |
243 | 232 |
244 body = '\n'.join(body) + '\n' | 233 ui.write(_('\nWrite the introductory message for the patch series.\n\n')) |
234 body = ui.edit(body, sender) | |
245 | 235 |
246 msg = email.MIMEText.MIMEText(body) | 236 msg = email.MIMEText.MIMEText(body) |
247 msg['Subject'] = subj | 237 msg['Subject'] = subj |
248 | 238 |
249 msgs.insert(0, msg) | 239 msgs.insert(0, msg) |