##// END OF EJS Templates
patchbomb: make getaddrs function easier to work with...
Augie Fackler -
r32826:3abba5bc default
parent child Browse files
Show More
@@ -660,15 +660,17 b' def email(ui, repo, *revs, **opts):'
660 if addr:
660 if addr:
661 showaddrs.append('%s: %s' % (header, addr))
661 showaddrs.append('%s: %s' % (header, addr))
662 return mail.addrlistencode(ui, [addr], _charsets, opts.get('test'))
662 return mail.addrlistencode(ui, [addr], _charsets, opts.get('test'))
663 else:
663 elif default:
664 return default
664 return mail.addrlistencode(
665 ui, [default], _charsets, opts.get('test'))
666 return []
665
667
666 to = getaddrs('To', ask=True)
668 to = getaddrs('To', ask=True)
667 if not to:
669 if not to:
668 # we can get here in non-interactive mode
670 # we can get here in non-interactive mode
669 raise error.Abort(_('no recipient addresses provided'))
671 raise error.Abort(_('no recipient addresses provided'))
670 cc = getaddrs('Cc', ask=True, default='') or []
672 cc = getaddrs('Cc', ask=True, default='')
671 bcc = getaddrs('Bcc') or []
673 bcc = getaddrs('Bcc')
672 replyto = getaddrs('Reply-To')
674 replyto = getaddrs('Reply-To')
673
675
674 confirm = ui.configbool('patchbomb', 'confirm')
676 confirm = ui.configbool('patchbomb', 'confirm')
General Comments 0
You need to be logged in to leave comments. Login now