|
21 | 21 | my $email = 1; |
22 | 22 | my $email_usename = 1; |
23 | 23 | my $email_maintainer = 1; |
| 24 | +my $email_reviewer = 1; |
24 | 25 | my $email_list = 1; |
25 | 26 | my $email_subscriber_list = 0; |
26 | 27 | my $email_git_penguin_chiefs = 0; |
|
202 | 203 | 'remove-duplicates!' => \$email_remove_duplicates, |
203 | 204 | 'mailmap!' => \$email_use_mailmap, |
204 | 205 | 'm!' => \$email_maintainer, |
| 206 | + 'r!' => \$email_reviewer, |
205 | 207 | 'n!' => \$email_usename, |
206 | 208 | 'l!' => \$email_list, |
207 | 209 | 's!' => \$email_subscriber_list, |
|
260 | 262 | } |
261 | 263 |
|
262 | 264 | if ($email && |
263 | | - ($email_maintainer + $email_list + $email_subscriber_list + |
| 265 | + ($email_maintainer + $email_reviewer + |
| 266 | + $email_list + $email_subscriber_list + |
264 | 267 | $email_git + $email_git_penguin_chiefs + $email_git_blame) == 0) { |
265 | 268 | die "$P: Please select at least 1 email option\n"; |
266 | 269 | } |
@@ -750,6 +753,7 @@ sub usage { |
750 | 753 | --hg-since => hg history to use (default: $email_hg_since) |
751 | 754 | --interactive => display a menu (mostly useful if used with the --git option) |
752 | 755 | --m => include maintainer(s) if any |
| 756 | + --r => include reviewer(s) if any |
753 | 757 | --n => include name 'Full Name <addr\@domain.tld>' |
754 | 758 | --l => include list(s) if any |
755 | 759 | --s => include subscriber only list(s) if any |
@@ -1064,6 +1068,22 @@ sub add_categories { |
1064 | 1068 | my $role = get_maintainer_role($i); |
1065 | 1069 | push_email_addresses($pvalue, $role); |
1066 | 1070 | } |
| 1071 | + } elsif ($ptype eq "R") { |
| 1072 | + my ($name, $address) = parse_email($pvalue); |
| 1073 | + if ($name eq "") { |
| 1074 | + if ($i > 0) { |
| 1075 | + my $tv = $typevalue[$i - 1]; |
| 1076 | + if ($tv =~ m/^(\C):\s*(.*)/) { |
| 1077 | + if ($1 eq "P") { |
| 1078 | + $name = $2; |
| 1079 | + $pvalue = format_email($name, $address, $email_usename); |
| 1080 | + } |
| 1081 | + } |
| 1082 | + } |
| 1083 | + } |
| 1084 | + if ($email_reviewer) { |
| 1085 | + push_email_addresses($pvalue, 'reviewer'); |
| 1086 | + } |
1067 | 1087 | } elsif ($ptype eq "T") { |
1068 | 1088 | push(@scm, $pvalue); |
1069 | 1089 | } elsif ($ptype eq "W") { |
|
0 commit comments