##// END OF EJS Templates
patchbomb: add --confirm option to show series details and ask for confirmation...
Christian Ebert -
r12201:5bfa4565 default
parent child Browse files
Show More
@@ -22,9 +22,9 b' Each message refers to the first in the '
22 and References headers, so they will show up as a sequence in threaded
22 and References headers, so they will show up as a sequence in threaded
23 mail and news readers, and in mail archives.
23 mail and news readers, and in mail archives.
24
24
25 With the -d/--diffstat option, you will be presented with a final
25 With the -d/--diffstat or -c/--confirm options, you will be presented
26 summary of all messages and asked for confirmation before the messages
26 with a final summary of all messages and asked for confirmation before
27 are sent.
27 the messages are sent.
28
28
29 To configure other defaults, add a section like this to your hgrc
29 To configure other defaults, add a section like this to your hgrc
30 file::
30 file::
@@ -412,7 +412,7 b' def patchbomb(ui, repo, *revs, **opts):'
412 bcc = getaddrs('bcc')
412 bcc = getaddrs('bcc')
413 replyto = getaddrs('reply-to')
413 replyto = getaddrs('reply-to')
414
414
415 if opts.get('diffstat'):
415 if opts.get('diffstat') or opts.get('confirm'):
416 ui.write(_('\nFinal summary:\n\n'))
416 ui.write(_('\nFinal summary:\n\n'))
417 ui.write('From: %s\n' % sender)
417 ui.write('From: %s\n' % sender)
418 for addr in showaddrs:
418 for addr in showaddrs:
@@ -509,6 +509,7 b' emailopts = ['
509 ('i', 'inline', None, _('send patches as inline attachments')),
509 ('i', 'inline', None, _('send patches as inline attachments')),
510 ('', 'bcc', [], _('email addresses of blind carbon copy recipients')),
510 ('', 'bcc', [], _('email addresses of blind carbon copy recipients')),
511 ('c', 'cc', [], _('email addresses of copy recipients')),
511 ('c', 'cc', [], _('email addresses of copy recipients')),
512 ('', 'confirm', None, _('ask for confirmation before sending')),
512 ('d', 'diffstat', None, _('add diffstat output to messages')),
513 ('d', 'diffstat', None, _('add diffstat output to messages')),
513 ('', 'date', '', _('use the given date as the sending date')),
514 ('', 'date', '', _('use the given date as the sending date')),
514 ('', 'desc', '', _('use the given file as the series description')),
515 ('', 'desc', '', _('use the given file as the series description')),
@@ -46,6 +46,23 b''
46 +a
46 +a
47
47
48
48
49 $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF
50 > n
51 > EOF
52 This patch series consists of 1 patches.
53
54
55 Final summary:
56
57 From: quux
58 To: foo
59 Cc: bar
60 Subject: [PATCH] a
61 a | 1 +
62 1 files changed, 1 insertions(+), 0 deletions(-)
63
64 are you sure you want to send (yn)? abort: patchbomb canceled
65
49 $ echo b > b
66 $ echo b > b
50 $ hg commit -Amb -d '2 0'
67 $ hg commit -Amb -d '2 0'
51 adding b
68 adding b
General Comments 0
You need to be logged in to leave comments. Login now