From patchwork Wed Dec 12 10:47:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 205476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B759E2C00A6 for ; Wed, 12 Dec 2012 21:44:31 +1100 (EST) Received: from localhost ([::1]:38310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tijng-0002Jh-29 for incoming@patchwork.ozlabs.org; Wed, 12 Dec 2012 05:44:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TijnQ-0002IF-P0 for qemu-devel@nongnu.org; Wed, 12 Dec 2012 05:44:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TijnI-0006Hq-Lq for qemu-devel@nongnu.org; Wed, 12 Dec 2012 05:44:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TijnI-0006Hc-F5 for qemu-devel@nongnu.org; Wed, 12 Dec 2012 05:44:04 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBCAi2Vq023509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Dec 2012 05:44:02 -0500 Received: from redhat.com (vpn1-6-172.ams2.redhat.com [10.36.6.172]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id qBCAi04X015680; Wed, 12 Dec 2012 05:44:00 -0500 Date: Wed, 12 Dec 2012 12:47:13 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org, Anthony Liguori Message-ID: <20121212104712.GA6218@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH] get_maintainer.pl: update from linix 3.8 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Update get_maintainer.pl to get new features. I use at least --no-multiline --no-roles --no-rolestats, there are more. Signed-off-by: Michael S. Tsirkin --- scripts/get_maintainer.pl | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index d9c48e0..bf5342a 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -83,6 +83,8 @@ push(@signature_tags, "Signed-off-by:"); push(@signature_tags, "Reviewed-by:"); push(@signature_tags, "Acked-by:"); +my $signature_pattern = "\(" . join("|", @signature_tags) . "\)"; + # rfc822 email address - preloaded methods go here. my $rfc822_lwsp = "(?:(?:\\r\\n)?[ \\t])"; my $rfc822_char = '[\\000-\\377]'; @@ -95,7 +97,7 @@ my %VCS_cmds_git = ( "execute_cmd" => \&git_execute_cmd, "available" => '(which("git") ne "") && (-d ".git")', "find_signers_cmd" => - "git log --no-color --since=\$email_git_since " . + "git log --no-color --follow --since=\$email_git_since " . '--format="GitCommit: %H%n' . 'GitAuthor: %an <%ae>%n' . 'GitDate: %aD%n' . @@ -328,7 +330,8 @@ sub read_mailmap { # name1 # name1 name2 # (see man git-shortlog) - if (/^(.+)<(.+)>$/) { + + if (/^([^<]+)<([^>]+)>$/) { my $real_name = $1; my $address = $2; @@ -336,13 +339,13 @@ sub read_mailmap { ($real_name, $address) = parse_email("$real_name <$address>"); $mailmap->{names}->{$address} = $real_name; - } elsif (/^<([^\s]+)>\s*<([^\s]+)>$/) { + } elsif (/^<([^>]+)>\s*<([^>]+)>$/) { my $real_address = $1; my $wrong_address = $2; $mailmap->{addresses}->{$wrong_address} = $real_address; - } elsif (/^(.+)<([^\s]+)>\s*<([^\s]+)>$/) { + } elsif (/^(.+)<([^>]+)>\s*<([^>]+)>$/) { my $real_name = $1; my $real_address = $2; my $wrong_address = $3; @@ -353,7 +356,7 @@ sub read_mailmap { $mailmap->{names}->{$wrong_address} = $real_name; $mailmap->{addresses}->{$wrong_address} = $real_address; - } elsif (/^(.+)<([^\s]+)>\s*([^\s].*)<([^\s]+)>$/) { + } elsif (/^(.+)<([^>]+)>\s*(.+)\s*<([^>]+)>$/) { my $real_name = $1; my $real_address = $2; my $wrong_name = $3; @@ -472,7 +475,6 @@ my @subsystem = (); my @status = (); my %deduplicate_name_hash = (); my %deduplicate_address_hash = (); -my $signature_pattern; my @maintainers = get_maintainers(); @@ -920,7 +922,7 @@ sub get_maintainer_role { my $start = find_starting_index($index); my $end = find_ending_index($index); - my $role; + my $role = "unknown"; my $subsystem = $typevalue[$start]; if (length($subsystem) > 20) { $subsystem = substr($subsystem, 0, 17); @@ -1016,8 +1018,13 @@ sub add_categories { if ($email_list) { if (!$hash_list_to{lc($list_address)}) { $hash_list_to{lc($list_address)} = 1; - push(@list_to, [$list_address, - "open list${list_role}"]); + if ($list_additional =~ m/moderated/) { + push(@list_to, [$list_address, + "moderated list${list_role}"]); + } else { + push(@list_to, [$list_address, + "open list${list_role}"]); + } } } }