Show More
@@ -34,6 +34,7 b' file::' | |||||
34 | to = recipient1, recipient2, ... |
|
34 | to = recipient1, recipient2, ... | |
35 | cc = cc1, cc2, ... |
|
35 | cc = cc1, cc2, ... | |
36 | bcc = bcc1, bcc2, ... |
|
36 | bcc = bcc1, bcc2, ... | |
|
37 | reply-to = address1, address2, ... | |||
37 |
|
38 | |||
38 | Use ``[patchbomb]`` as configuration section name if you need to |
|
39 | Use ``[patchbomb]`` as configuration section name if you need to | |
39 | override global ``[email]`` address settings. |
|
40 | override global ``[email]`` address settings. | |
@@ -390,8 +391,9 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
390 | msgs = getpatchmsgs(list(getpatches(revs))) |
|
391 | msgs = getpatchmsgs(list(getpatches(revs))) | |
391 |
|
392 | |||
392 | def getaddrs(opt, prpt=None, default=None): |
|
393 | def getaddrs(opt, prpt=None, default=None): | |
393 |
|
|
394 | addrs = opts.get(opt.replace('-', '_')) | |
394 | return mail.addrlistencode(ui, opts.get(opt), _charsets, |
|
395 | if addrs: | |
|
396 | return mail.addrlistencode(ui, addrs, _charsets, | |||
395 | opts.get('test')) |
|
397 | opts.get('test')) | |
396 |
|
398 | |||
397 | addrs = (ui.config('email', opt) or |
|
399 | addrs = (ui.config('email', opt) or | |
@@ -404,6 +406,7 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
404 | to = getaddrs('to', 'To') |
|
406 | to = getaddrs('to', 'To') | |
405 | cc = getaddrs('cc', 'Cc', '') |
|
407 | cc = getaddrs('cc', 'Cc', '') | |
406 | bcc = getaddrs('bcc') |
|
408 | bcc = getaddrs('bcc') | |
|
409 | replyto = getaddrs('reply-to') | |||
407 |
|
410 | |||
408 | ui.write('\n') |
|
411 | ui.write('\n') | |
409 |
|
412 | |||
@@ -442,6 +445,8 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
442 | m['Cc'] = ', '.join(cc) |
|
445 | m['Cc'] = ', '.join(cc) | |
443 | if bcc: |
|
446 | if bcc: | |
444 | m['Bcc'] = ', '.join(bcc) |
|
447 | m['Bcc'] = ', '.join(bcc) | |
|
448 | if replyto: | |||
|
449 | m['Reply-To'] = ', '.join(replyto) | |||
445 | if opts.get('test'): |
|
450 | if opts.get('test'): | |
446 | ui.status(_('Displaying '), subj, ' ...\n') |
|
451 | ui.status(_('Displaying '), subj, ' ...\n') | |
447 | ui.flush() |
|
452 | ui.flush() | |
@@ -493,6 +498,7 b' emailopts = [' | |||||
493 | ('n', 'test', None, _('print messages that would be sent')), |
|
498 | ('n', 'test', None, _('print messages that would be sent')), | |
494 | ('m', 'mbox', '', |
|
499 | ('m', 'mbox', '', | |
495 | _('write messages to mbox file instead of sending them')), |
|
500 | _('write messages to mbox file instead of sending them')), | |
|
501 | ('', 'reply-to', [], _('email addresses replies should be sent to')), | |||
496 | ('s', 'subject', '', |
|
502 | ('s', 'subject', '', | |
497 | _('subject of first message (intro or single patch)')), |
|
503 | _('subject of first message (intro or single patch)')), | |
498 | ('', 'in-reply-to', '', |
|
504 | ('', 'in-reply-to', '', |
@@ -135,6 +135,14 b' echo "% test intro for multiple patches"' | |||||
135 | hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ |
|
135 | hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ | |
136 | -r 0:1 | fixheaders |
|
136 | -r 0:1 | fixheaders | |
137 |
|
137 | |||
|
138 | echo "% test reply-to via config" | |||
|
139 | hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ | |||
|
140 | --config patchbomb.reply-to='baz@example.com' | fixheaders | |||
|
141 | ||||
|
142 | echo "% test reply-to via command line" | |||
|
143 | hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ | |||
|
144 | --reply-to baz --reply-to fred | fixheaders | |||
|
145 | ||||
138 | echo "% tagging csets" |
|
146 | echo "% tagging csets" | |
139 | hg tag -r0 zero zero.foo |
|
147 | hg tag -r0 zero zero.foo | |
140 | hg tag -r1 one one.patch |
|
148 | hg tag -r1 one one.patch |
@@ -1062,6 +1062,68 b' diff -r 8580ff50825a -r 97d72e5f12c7 b' | |||||
1062 | @@ -0,0 +1,1 @@ |
|
1062 | @@ -0,0 +1,1 @@ | |
1063 | +b |
|
1063 | +b | |
1064 |
|
1064 | |||
|
1065 | % test reply-to via config | |||
|
1066 | This patch series consists of 1 patches. | |||
|
1067 | ||||
|
1068 | ||||
|
1069 | Displaying [PATCH] test ... | |||
|
1070 | Content-Type: text/plain; charset="us-ascii" | |||
|
1071 | MIME-Version: 1.0 | |||
|
1072 | Content-Transfer-Encoding: 7bit | |||
|
1073 | Subject: [PATCH] test | |||
|
1074 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |||
|
1075 | Message-Id: <ff2c9fa2018b15fa74b3.60@ | |||
|
1076 | User-Agent: Mercurial-patchbomb | |||
|
1077 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |||
|
1078 | From: quux | |||
|
1079 | To: foo | |||
|
1080 | Cc: bar | |||
|
1081 | Reply-To: baz@example.com | |||
|
1082 | ||||
|
1083 | # HG changeset patch | |||
|
1084 | # User test | |||
|
1085 | # Date 3 0 | |||
|
1086 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |||
|
1087 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |||
|
1088 | c | |||
|
1089 | ||||
|
1090 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |||
|
1091 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
1092 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |||
|
1093 | @@ -0,0 +1,1 @@ | |||
|
1094 | +c | |||
|
1095 | ||||
|
1096 | % test reply-to via command line | |||
|
1097 | This patch series consists of 1 patches. | |||
|
1098 | ||||
|
1099 | ||||
|
1100 | Displaying [PATCH] test ... | |||
|
1101 | Content-Type: text/plain; charset="us-ascii" | |||
|
1102 | MIME-Version: 1.0 | |||
|
1103 | Content-Transfer-Encoding: 7bit | |||
|
1104 | Subject: [PATCH] test | |||
|
1105 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |||
|
1106 | Message-Id: <ff2c9fa2018b15fa74b3.60@ | |||
|
1107 | User-Agent: Mercurial-patchbomb | |||
|
1108 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |||
|
1109 | From: quux | |||
|
1110 | To: foo | |||
|
1111 | Cc: bar | |||
|
1112 | Reply-To: baz, fred | |||
|
1113 | ||||
|
1114 | # HG changeset patch | |||
|
1115 | # User test | |||
|
1116 | # Date 3 0 | |||
|
1117 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |||
|
1118 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |||
|
1119 | c | |||
|
1120 | ||||
|
1121 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |||
|
1122 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |||
|
1123 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |||
|
1124 | @@ -0,0 +1,1 @@ | |||
|
1125 | +c | |||
|
1126 | ||||
1065 | % tagging csets |
|
1127 | % tagging csets | |
1066 | % test inline for single named patch |
|
1128 | % test inline for single named patch | |
1067 | This patch series consists of 1 patches. |
|
1129 | This patch series consists of 1 patches. |
General Comments 0
You need to be logged in to leave comments.
Login now