Show More
@@ -34,6 +34,7 b' file::' | |||
|
34 | 34 | to = recipient1, recipient2, ... |
|
35 | 35 | cc = cc1, cc2, ... |
|
36 | 36 | bcc = bcc1, bcc2, ... |
|
37 | reply-to = address1, address2, ... | |
|
37 | 38 | |
|
38 | 39 | Use ``[patchbomb]`` as configuration section name if you need to |
|
39 | 40 | override global ``[email]`` address settings. |
@@ -390,8 +391,9 b' def patchbomb(ui, repo, *revs, **opts):' | |||
|
390 | 391 | msgs = getpatchmsgs(list(getpatches(revs))) |
|
391 | 392 | |
|
392 | 393 | def getaddrs(opt, prpt=None, default=None): |
|
393 |
|
|
|
394 | return mail.addrlistencode(ui, opts.get(opt), _charsets, | |
|
394 | addrs = opts.get(opt.replace('-', '_')) | |
|
395 | if addrs: | |
|
396 | return mail.addrlistencode(ui, addrs, _charsets, | |
|
395 | 397 | opts.get('test')) |
|
396 | 398 | |
|
397 | 399 | addrs = (ui.config('email', opt) or |
@@ -404,6 +406,7 b' def patchbomb(ui, repo, *revs, **opts):' | |||
|
404 | 406 | to = getaddrs('to', 'To') |
|
405 | 407 | cc = getaddrs('cc', 'Cc', '') |
|
406 | 408 | bcc = getaddrs('bcc') |
|
409 | replyto = getaddrs('reply-to') | |
|
407 | 410 | |
|
408 | 411 | ui.write('\n') |
|
409 | 412 | |
@@ -442,6 +445,8 b' def patchbomb(ui, repo, *revs, **opts):' | |||
|
442 | 445 | m['Cc'] = ', '.join(cc) |
|
443 | 446 | if bcc: |
|
444 | 447 | m['Bcc'] = ', '.join(bcc) |
|
448 | if replyto: | |
|
449 | m['Reply-To'] = ', '.join(replyto) | |
|
445 | 450 | if opts.get('test'): |
|
446 | 451 | ui.status(_('Displaying '), subj, ' ...\n') |
|
447 | 452 | ui.flush() |
@@ -493,6 +498,7 b' emailopts = [' | |||
|
493 | 498 | ('n', 'test', None, _('print messages that would be sent')), |
|
494 | 499 | ('m', 'mbox', '', |
|
495 | 500 | _('write messages to mbox file instead of sending them')), |
|
501 | ('', 'reply-to', [], _('email addresses replies should be sent to')), | |
|
496 | 502 | ('s', 'subject', '', |
|
497 | 503 | _('subject of first message (intro or single patch)')), |
|
498 | 504 | ('', 'in-reply-to', '', |
@@ -135,6 +135,14 b' echo "% test intro for multiple patches"' | |||
|
135 | 135 | hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ |
|
136 | 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 | 146 | echo "% tagging csets" |
|
139 | 147 | hg tag -r0 zero zero.foo |
|
140 | 148 | hg tag -r1 one one.patch |
@@ -1062,6 +1062,68 b' diff -r 8580ff50825a -r 97d72e5f12c7 b' | |||
|
1062 | 1062 | @@ -0,0 +1,1 @@ |
|
1063 | 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 | 1127 | % tagging csets |
|
1066 | 1128 | % test inline for single named patch |
|
1067 | 1129 | This patch series consists of 1 patches. |
General Comments 0
You need to be logged in to leave comments.
Login now