From: Nicholas Clark Date: Sat, 14 Jan 2006 12:49:31 +0000 (+0000) Subject: Can now count the patches committed with --thanks-applied. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff4d71b57bb83cfac46282a097123c6ae517cd8f;p=p5sagit%2Fp5-mst-13.2.git Can now count the patches committed with --thanks-applied. Changes5.8's top 3: 3332: jhi 321: ams 60: nick p4raw-id: //depot/perl@26856 --- diff --git a/Porting/checkAUTHORS.pl b/Porting/checkAUTHORS.pl index e3ce324..ae9dc71 100644 --- a/Porting/checkAUTHORS.pl +++ b/Porting/checkAUTHORS.pl @@ -5,14 +5,16 @@ $Text::Wrap::columns = 80; my ($committer, $patch, $log); use Getopt::Long; -my ($rank, @authors, %authors, %untraced, %patchers); -my $result = GetOptions ("rank" => \$rank, # rank authors - "acknowledged=s" => \@authors); # authors files +my ($rank, $ta, @authors, %authors, %untraced, %patchers, %committers); +my $result = GetOptions ("rank" => \$rank, # rank authors + "thanks-applied" => \$ta, # ranks committers + "acknowledged=s" => \@authors); # authors files -if (!$result or !($rank xor @authors) or !@ARGV) { +if (!$result or (($rank||0) + ($ta||0) + (@authors ? 1 : 0) != 1) or !@ARGV) { die <<"EOS"; $0 --rank Changelogs # rank authors by patches $0 --acknowledged Changelogs # Display unacknowledged authors +$0 --thanks-applied Changelogs # ranks committers Specify stdin as - if needs be. Remember that option names can be abbreviated. EOS } @@ -212,7 +214,9 @@ while (<>) { &process ($committer, $patch, $log); if ($rank) { - &display_ordered; + &display_ordered(\%patchers); +} elsif ($ta) { + &display_ordered(\%committers); } elsif (%authors) { my %missing; foreach (sort keys %patchers) { @@ -229,8 +233,9 @@ if ($rank) { } sub display_ordered { + my $what = shift; my @sorted; - while (my ($name, $count) = each %patchers) { + while (my ($name, $count) = each %$what) { push @{$sorted[$count]}, $name; } @@ -255,6 +260,7 @@ sub process { $patchers{$map{$_} || $_}++; } # print "$patch: @authors\n"; + ++$committers{$committer}; } else { # print "$patch: $committer\n"; # Not entirely fair as this means that the maint pumpking scores for