##// END OF EJS Templates
patchbomb: Don't prompt for headers until sure we have revs to export....
Bryan O'Sullivan -
r4485:82bc6aef default
parent child Browse files
Show More
@@ -250,23 +250,6 b' def patchbomb(ui, repo, *revs, **opts):'
250 def genmsgid(id):
250 def genmsgid(id):
251 return '<%s.%s@%s>' % (id[:20], int(start_time[0]), socket.getfqdn())
251 return '<%s.%s@%s>' % (id[:20], int(start_time[0]), socket.getfqdn())
252
252
253 sender = (opts['from'] or ui.config('email', 'from') or
254 ui.config('patchbomb', 'from') or
255 prompt('From', ui.username()))
256
257 def getaddrs(opt, prpt, default = None):
258 addrs = opts[opt] or (ui.config('email', opt) or
259 ui.config('patchbomb', opt) or
260 prompt(prpt, default = default)).split(',')
261 return [a.strip() for a in addrs if a.strip()]
262
263 to = getaddrs('to', 'To')
264 cc = getaddrs('cc', 'Cc', '')
265
266 bcc = opts['bcc'] or (ui.config('email', 'bcc') or
267 ui.config('patchbomb', 'bcc') or '').split(',')
268 bcc = [a.strip() for a in bcc if a.strip()]
269
270 def getexportmsgs():
253 def getexportmsgs():
271 patches = []
254 patches = []
272
255
@@ -344,6 +327,23 b' def patchbomb(ui, repo, *revs, **opts):'
344 else:
327 else:
345 msgs = getexportmsgs()
328 msgs = getexportmsgs()
346
329
330 sender = (opts['from'] or ui.config('email', 'from') or
331 ui.config('patchbomb', 'from') or
332 prompt('From', ui.username()))
333
334 def getaddrs(opt, prpt, default = None):
335 addrs = opts[opt] or (ui.config('email', opt) or
336 ui.config('patchbomb', opt) or
337 prompt(prpt, default = default)).split(',')
338 return [a.strip() for a in addrs if a.strip()]
339
340 to = getaddrs('to', 'To')
341 cc = getaddrs('cc', 'Cc', '')
342
343 bcc = opts['bcc'] or (ui.config('email', 'bcc') or
344 ui.config('patchbomb', 'bcc') or '').split(',')
345 bcc = [a.strip() for a in bcc if a.strip()]
346
347 ui.write('\n')
347 ui.write('\n')
348
348
349 if not opts['test'] and not opts['mbox']:
349 if not opts['test'] and not opts['mbox']:
General Comments 0
You need to be logged in to leave comments. Login now