From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com, thuth@redhat.com, pavel.dovgaluk@ispras.ru
Subject: [Qemu-devel] [PATCH 2/5] get_maintainer: Teach get_maintainer.pl about the new "R:" tag
Date: Wed, 3 May 2017 11:43:48 +0200 [thread overview]
Message-ID: <20170503094351.5040-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20170503094351.5040-1-pbonzini@redhat.com>
From: Joe Perches <joe@perches.com>
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.
Cherry picked from Linux commit c1c3f2c906e35bcb6e4cdf5b8e077660fead14fe,
with fixes to avoid \C as in QEMU commit ba10f729f1 ("get_maintainer.pl:
\C is deprecated", 2015-09-25).
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/get_maintainer.pl | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 8261bcb1ad..2bde32f64b 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -21,6 +21,7 @@ my $lk_path = "./";
my $email = 1;
my $email_usename = 1;
my $email_maintainer = 1;
+my $email_reviewer = 1;
my $email_list = 1;
my $email_subscriber_list = 0;
my $email_git = 0;
@@ -180,6 +181,7 @@ if (!GetOptions(
'remove-duplicates!' => \$email_remove_duplicates,
'mailmap!' => \$email_use_mailmap,
'm!' => \$email_maintainer,
+ 'r!' => \$email_reviewer,
'n!' => \$email_usename,
'l!' => \$email_list,
's!' => \$email_subscriber_list,
@@ -238,7 +240,8 @@ if ($sections) {
}
if ($email &&
- ($email_maintainer + $email_list + $email_subscriber_list +
+ ($email_maintainer + $email_reviewer +
+ $email_list + $email_subscriber_list +
$email_git + $email_git_blame) == 0) {
die "$P: Please select at least 1 email option\n";
}
@@ -718,6 +721,7 @@ MAINTAINER field selection options:
--hg-since => hg history to use (default: $email_hg_since)
--interactive => display a menu (mostly useful if used with the --git option)
--m => include maintainer(s) if any
+ --r => include reviewer(s) if any
--n => include name 'Full Name <addr\@domain.tld>'
--l => include list(s) if any
--s => include subscriber only list(s) if any
@@ -1022,6 +1026,22 @@ sub add_categories {
my $role = get_maintainer_role($i);
push_email_addresses($pvalue, $role);
}
+ } elsif ($ptype eq "R") {
+ my ($name, $address) = parse_email($pvalue);
+ if ($name eq "") {
+ if ($i > 0) {
+ my $tv = $typevalue[$i - 1];
+ if ($tv =~ m/^(.):\s*(.*)/) {
+ if ($1 eq "P") {
+ $name = $2;
+ $pvalue = format_email($name, $address, $email_usename);
+ }
+ }
+ }
+ }
+ if ($email_reviewer) {
+ push_email_addresses($pvalue, 'reviewer');
+ }
} elsif ($ptype eq "T") {
push(@scm, $pvalue);
} elsif ($ptype eq "W") {
--
2.12.2
next prev parent reply other threads:[~2017-05-03 9:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-03 9:43 [Qemu-devel] [PATCH 0/5] MAINTAINERS/get_maintainers: add support for reviewers Paolo Bonzini
2017-05-03 9:43 ` [Qemu-devel] [PATCH 1/5] MAINTAINERS: Add "R:" tag for self-appointed reviewers Paolo Bonzini
2017-05-03 18:23 ` John Snow
2017-05-03 18:42 ` Paolo Bonzini
2017-05-03 9:43 ` Paolo Bonzini [this message]
2017-05-03 10:45 ` [Qemu-devel] [PATCH 2/5] get_maintainer: Teach get_maintainer.pl about the new "R:" tag Thomas Huth
2017-05-03 11:53 ` Paolo Bonzini
2017-05-03 9:43 ` [Qemu-devel] [PATCH 3/5] get_maintainer: it's '--pattern-depth', not '-pattern-depth' Paolo Bonzini
2017-05-03 9:43 ` [Qemu-devel] [PATCH 4/5] get_maintainer: --r (list reviewer) is on by default Paolo Bonzini
2017-05-03 9:43 ` [Qemu-devel] [PATCH 5/5] get_maintainer: add subsystem to reviewer output Paolo Bonzini
2017-05-03 12:29 ` [Qemu-devel] [PATCH 0/5] MAINTAINERS/get_maintainers: add support for reviewers Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170503094351.5040-3-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).