diff options
author | Joe Perches <joe@perches.com> | 2014-06-02 15:05:17 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-07-08 17:47:17 -0400 |
commit | c1c3f2c906e35bcb6e4cdf5b8e077660fead14fe (patch) | |
tree | b59b253d5d5f86c894331f4b6f4e26d030802675 | |
parent | 34e2d560bcdd639717367a570063011ae74b6782 (diff) |
scripts: Teach get_maintainer.pl about the new "R:" tag
We can now designate reviewers in the MAINTAINERS file with the new
"R:" tag, so this commit teaches get_maintainers.pl to add their
email addresses.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rwxr-xr-x | scripts/get_maintainer.pl | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 41987885bd31..d7016279ec2b 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -21,6 +21,7 @@ my $lk_path = "./"; | |||
21 | my $email = 1; | 21 | my $email = 1; |
22 | my $email_usename = 1; | 22 | my $email_usename = 1; |
23 | my $email_maintainer = 1; | 23 | my $email_maintainer = 1; |
24 | my $email_reviewer = 1; | ||
24 | my $email_list = 1; | 25 | my $email_list = 1; |
25 | my $email_subscriber_list = 0; | 26 | my $email_subscriber_list = 0; |
26 | my $email_git_penguin_chiefs = 0; | 27 | my $email_git_penguin_chiefs = 0; |
@@ -202,6 +203,7 @@ if (!GetOptions( | |||
202 | 'remove-duplicates!' => \$email_remove_duplicates, | 203 | 'remove-duplicates!' => \$email_remove_duplicates, |
203 | 'mailmap!' => \$email_use_mailmap, | 204 | 'mailmap!' => \$email_use_mailmap, |
204 | 'm!' => \$email_maintainer, | 205 | 'm!' => \$email_maintainer, |
206 | 'r!' => \$email_reviewer, | ||
205 | 'n!' => \$email_usename, | 207 | 'n!' => \$email_usename, |
206 | 'l!' => \$email_list, | 208 | 'l!' => \$email_list, |
207 | 's!' => \$email_subscriber_list, | 209 | 's!' => \$email_subscriber_list, |
@@ -260,7 +262,8 @@ if ($sections) { | |||
260 | } | 262 | } |
261 | 263 | ||
262 | if ($email && | 264 | if ($email && |
263 | ($email_maintainer + $email_list + $email_subscriber_list + | 265 | ($email_maintainer + $email_reviewer + |
266 | $email_list + $email_subscriber_list + | ||
264 | $email_git + $email_git_penguin_chiefs + $email_git_blame) == 0) { | 267 | $email_git + $email_git_penguin_chiefs + $email_git_blame) == 0) { |
265 | die "$P: Please select at least 1 email option\n"; | 268 | die "$P: Please select at least 1 email option\n"; |
266 | } | 269 | } |
@@ -750,6 +753,7 @@ MAINTAINER field selection options: | |||
750 | --hg-since => hg history to use (default: $email_hg_since) | 753 | --hg-since => hg history to use (default: $email_hg_since) |
751 | --interactive => display a menu (mostly useful if used with the --git option) | 754 | --interactive => display a menu (mostly useful if used with the --git option) |
752 | --m => include maintainer(s) if any | 755 | --m => include maintainer(s) if any |
756 | --r => include reviewer(s) if any | ||
753 | --n => include name 'Full Name <addr\@domain.tld>' | 757 | --n => include name 'Full Name <addr\@domain.tld>' |
754 | --l => include list(s) if any | 758 | --l => include list(s) if any |
755 | --s => include subscriber only list(s) if any | 759 | --s => include subscriber only list(s) if any |
@@ -1064,6 +1068,22 @@ sub add_categories { | |||
1064 | my $role = get_maintainer_role($i); | 1068 | my $role = get_maintainer_role($i); |
1065 | push_email_addresses($pvalue, $role); | 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 | } elsif ($ptype eq "T") { | 1087 | } elsif ($ptype eq "T") { |
1068 | push(@scm, $pvalue); | 1088 | push(@scm, $pvalue); |
1069 | } elsif ($ptype eq "W") { | 1089 | } elsif ($ptype eq "W") { |