diff -r c14af817ab76 -r 11b215731e74 hgext/patchbomb.py --- a/hgext/patchbomb.py Tue Dec 02 17:24:52 2014 -0800 +++ b/hgext/patchbomb.py Tue Dec 02 17:35:21 2014 -0800 @@ -52,6 +52,9 @@ intro=auto # include introduction message if more than 1 patch (default) intro=never # never include an introduction message intro=always # always include an introduction message + +You can set patchbomb to always ask for confirmation by setting +``patchbomb.confirm`` to true. ''' import os, errno, socket, tempfile, cStringIO @@ -430,9 +433,10 @@ for each patchbomb message, so you can verify everything is alright. In case email sending fails, you will find a backup of your series - introductory message in ``.hg/last-email.txt``. The inclusion the - introduction can also be control using the ``patchbomb.intro`` option. (see - hg help patchbomb for details) + introductory message in ``.hg/last-email.txt``. + + The default behavior of this command can be customized through + configuration. (See :hg:`help patchbomb` for details) Examples:: @@ -553,7 +557,10 @@ bcc = getaddrs('Bcc') or [] replyto = getaddrs('Reply-To') - if opts.get('diffstat') or opts.get('confirm'): + confirm = ui.configbool('patchbomb', 'confirm') + confirm |= bool(opts.get('diffstat') or opts.get('confirm')) + + if confirm: ui.write(_('\nFinal summary:\n\n'), label='patchbomb.finalsummary') ui.write(('From: %s\n' % sender), label='patchbomb.from') for addr in showaddrs: