From b321f4b5433dcefcfdd8e759b25e88e7c989124d Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 21 Sep 2009 17:04:14 -0700 Subject: [PATCH] --- yaml --- r: 164511 b: refs/heads/master c: 1d606b4e0bf8fe45e3f88543dfce83207ae0027d h: refs/heads/master i: 164509: be0c12aa3529fb676730e1fdcb6477caa4346ff9 164507: 25d00faffa0520761e83b33965aa453b3f35d4fa 164503: 6ae3ea9b7b9f40db0b16fa0cd22f1c4577320849 164495: ec6c470a7f8b8bd3a3751817219aad22e75cb970 164479: 59b3f1626352ff811d66bb3385b2a886c0762ddc v: v3 --- [refs] | 2 +- trunk/scripts/get_maintainer.pl | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 1d092bf94ff7..0c755ba6b08b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f5492666a3b62344de9026a960c11888160362c9 +refs/heads/master: 1d606b4e0bf8fe45e3f88543dfce83207ae0027d diff --git a/trunk/scripts/get_maintainer.pl b/trunk/scripts/get_maintainer.pl index 35781e0d43e6..fb446e0f8bbf 100755 --- a/trunk/scripts/get_maintainer.pl +++ b/trunk/scripts/get_maintainer.pl @@ -211,6 +211,7 @@ if ($type eq 'X') { if (file_match_pattern($file, $value)) { $exclude = 1; + last; } } } @@ -218,18 +219,24 @@ if (!$exclude) { my $tvi = 0; + my %hash; foreach my $line (@typevalue) { if ($line =~ m/^(\C):\s*(.*)/) { my $type = $1; my $value = $2; if ($type eq 'F') { if (file_match_pattern($file, $value)) { - add_categories($tvi); + my $pattern_depth = ($value =~ tr@/@@); + $pattern_depth++ if (!(substr($value,-1,1) eq "/")); + $hash{$tvi} = $pattern_depth; } } } $tvi++; } + foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) { + add_categories($line); + } } if ($email && $email_git) {