mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
patchbomb: fix up confusion between strings and lists of strings.
This commit is contained in:
parent
d3995fac64
commit
5bcd6d125f
@ -172,11 +172,13 @@ def patchbomb(ui, repo, *revs, **opts):
|
||||
len(patches),
|
||||
opts['subject'] or
|
||||
prompt('Subject:', rest = ' [PATCH 0 of %d] ' % len(patches)))
|
||||
to = opts['to'] or ui.config('patchbomb', 'to') or prompt('To')
|
||||
to = [t.strip() for t in to.split(',')]
|
||||
cc = (opts['cc'] or ui.config('patchbomb', 'cc') or
|
||||
prompt('Cc', default = ''))
|
||||
cc = (cc and [c.strip() for c in cc.split(',')]) or []
|
||||
|
||||
def getaddrs(opt, prpt, default = None):
|
||||
addrs = opts[opt] or (ui.config('patchbomb', opt) or
|
||||
prompt(prpt, default = default)).split(',')
|
||||
return [a.strip() for a in addrs if a.strip()]
|
||||
to = getaddrs('to', 'To')
|
||||
cc = getaddrs('cc', 'Cc', '')
|
||||
|
||||
ui.write('Finish with ^D or a dot on a line by itself.\n\n')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user