From patchwork Fri Oct 9 10:32:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 35613 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id A25A6B7E20 for ; Fri, 9 Oct 2009 21:34:40 +1100 (EST) Received: by ozlabs.org (Postfix) id 3ABAFB7B96; Fri, 9 Oct 2009 21:34:33 +1100 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by ozlabs.org (Postfix) with ESMTP id D7AABB7B78 for ; Fri, 9 Oct 2009 21:34:32 +1100 (EST) Received: from themisto.ext.pengutronix.de ([92.198.50.58] helo=pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.63) (envelope-from ) id 1MwCnp-0001aN-5B; Fri, 09 Oct 2009 12:34:28 +0200 From: Wolfram Sang To: linux-kernel@vger.kernel.org Date: Fri, 9 Oct 2009 12:32:59 +0200 Message-Id: <1255084379-12954-1-git-send-email-w.sang@pengutronix.de> X-Mailer: git-send-email 1.6.3.3 X-SA-Exim-Connect-IP: 92.198.50.58 X-SA-Exim-Mail-From: w.sang@pengutronix.de X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on metis.extern.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.5 required=4.5 tests=AWL, BAYES_00 shortcircuit=no autolearn=ham version=3.2.4 Subject: [RFC] scripts/get_maintainer: add emails based on keywords in the patch X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) X-PTX-Original-Recipient: linuxppc-dev@ozlabs.org Cc: devicetree-discuss@ozlabs.org, linuxppc-dev@ozlabs.org, Joe Perches X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Make get_maintainer.pl scan the modifying lines of a patch for a list of keywords and add an associated email if found. The first user is the devicetree-discuss mailing list which should always be cc'ed if a device tree property is inserted/removed (keyword 'of_get_property'). This patch is the result from commit 1965d30356c1c65660ba3330927671cfe81acdd5 entering mainline which seems to have been missed by all parties interested in the device tree (and at least had the documentation missing). As adding properties can happen anywhere and so there is no fitting fileglob, this keyword based approach is proposed. Signed-off-by: Wolfram Sang Cc: Joe Perches Cc: Grant Likely Cc: Anton Vorontsov --- scripts/get_maintainer.pl | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index cdb44b6..e1150ea 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -44,6 +44,11 @@ my $help = 0; my $exit = 0; +my %keywords_to_mail = ( + 'of_get_property' => 'L: devicetree-discuss@lists.ozlabs.org', +); +my $keywords_to_mail_match = join('|', keys %keywords_to_mail); + my @penguin_chief = (); push(@penguin_chief,"Linus Torvalds:torvalds\@linux-foundation.org"); #Andrew wants in on most everything - 2009/01/14 @@ -188,6 +193,12 @@ if ($email_remove_duplicates) { my @files = (); my @range = (); +my @email_to = (); +my @list_to = (); +my @scm = (); +my @web = (); +my @subsystem = (); +my @status = (); foreach my $file (@ARGV) { ##if $file is a directory and it lacks a trailing slash, add one @@ -213,7 +224,11 @@ foreach my $file (@ARGV) { if ($email_git_blame) { push(@range, "$lastfile:$1:$2"); } - } + # Check the lines which a patch modifies for keywords; add mail if found. + } elsif (m/^[+-].*($keywords_to_mail_match)/o) { + (my $keyword_mail = $keywords_to_mail{$1}) =~ s/^([LM]): //; + push( @{ ($1 eq 'L') ? \@list_to : \@email_to }, $keyword_mail ); + } } close(PATCH); if ($file_cnt == @files) { @@ -224,13 +239,6 @@ foreach my $file (@ARGV) { } } -my @email_to = (); -my @list_to = (); -my @scm = (); -my @web = (); -my @subsystem = (); -my @status = (); - # Find responsible parties foreach my $file (@files) {