Merge branch 'blead' of ssh://perl5.git.perl.org/gitroot/perl into blead
Jesse Vincent [Sat, 27 Mar 2010 16:33:56 +0000 (12:33 -0400)]
* 'blead' of ssh://perl5.git.perl.org/gitroot/perl:
  [perl #73720] opt_scalarhv(or OP_BOOLKEYS) does not work

Porting/checkAUTHORS.pl
pod/perl5120delta.pod

index 6b22fc6..4620c68 100644 (file)
@@ -2,7 +2,7 @@
 use strict;
 use Text::Wrap;
 $Text::Wrap::columns = 80;
-my ($committer, $patch, $log,$date);
+my ($committer, $patch, $author, $date);
 use Getopt::Long;
 
 my ($rank, $percentage, $cumulative, $reverse, $ta, @authors, %authors,
@@ -17,13 +17,14 @@ my $result = GetOptions ("rank" => \$rank,            # rank authors
 
 if (!$result or (($rank||0) + ($ta||0) + (@authors ? 1 : 0) != 1) or !@ARGV) {
   die <<"EOS";
-$0 --rank Changelogs                        # rank authors by patches
-$0 --acknowledged <authors file> Changelogs # Display unacknowledged authors
-$0 --thanks-applied Changelogs            # ranks committers
+$0 --rank changes                           # rank authors by patches
+$0 --acknowledged <authors file> changes    # Display unacknowledged authors
+$0 --thanks-applied changes                 # ranks committers of others' patches
 $0 --percentage ...                         # show rankings as percentages
 $0 --cumulative ...                         # show rankings cumulatively
 $0 --reverse ...                            # show rankings in reverse
 Specify stdin as - if needs be. Remember that option names can be abbreviated.
+Generate changes with git log --pretty=fuller --name-status rev1..rev2
 EOS
 }
 
@@ -145,14 +146,16 @@ if (@authors) {
 
 my @lines = split(/^commit\s*/sm,join('',<>));
 for ( @lines) {
-    next if m/^$/;
+  next if m/^$/;
   next if m/^(\S*?)^Merge:/ism; # skip merge commits
-  if (m/^(.*?)^Author:\s*(.*?)^Date:\s*(.*?)^(.*)$/gism) {
+if (m/^(.*?)^Author:\s*(.*?)^AuthorDate:\s*(.*?)^Commit:\s*(.*?)^(.*)$/gism) {
     # new patch
-    ($patch, $committer, $date,$log) = ($1,$2,$3,$4);
+    ($patch, $author, $date, $committer) = ($1,$2,$3,$4);
+    chomp($author);
+    unless ($author) { die $_}
     chomp($committer);
     unless ($committer) { die $_}
-    &process ($committer, $patch, $log);
+    &process($committer, $patch, $author);
 } else { die "XXX $_ did not match";}
 }
 
@@ -206,22 +209,17 @@ sub display_ordered {
 }
 
 sub process {
-  my ($committer, $patch, $log) = @_;
+  my ($committer, $patch, $author) = @_;
+  return unless $author;
   return unless $committer;
-  my @authors = $log =~ /From:\s+.*?([^"\@ \t\n<>]+\@[^"\@ \t\n<>]+)/gm;
 
-  if (@authors) {
-    foreach my $addr (@authors) {
+  $author = _raw_address($author);
+  $patchers{$author}++;
 
-      $patchers{_raw_address($addr)}++;
-    }
-    # print "$patch: @authors\n";
-    $committers{_raw_address($committer)}++;
-  } else {
-      # print "$patch: $committer\n";
-    # Not entirely fair as this means that the maint pumpking scores for
-    # everything intergrated that wasn't a third party patch in blead
-    $patchers{_raw_address($committer)}++;
+  $committer = _raw_address($committer);
+  if ($committer ne $author) {
+    # separate commit credit only if committing someone else's patch
+    $committers{$committer}++;
   }
 }
 
@@ -232,6 +230,8 @@ sub _raw_address {
     $addr =~ s/^\s*(.*)\s*<\s*(.*?)\s*>.*$/$2/ ;
      $real_name = $1;
     }
+    $addr =~ s/\[mailto://;
+    $addr =~ s/\]//;
     $addr = lc $addr;
     $addr = $map{$addr} || $addr;
     $addr =~ s/\\100/@/g;  # Sometimes, there are encoded @ signs in the git log.
@@ -451,6 +451,7 @@ david\100kineticode.com                 david\100wheeler.com
 +                                       david\100wheeler.net
 dennis\100booking.com                   dennis\100camel.ams6.corp.booking.com
 dev-perl\100pimb.org                    knew-p5p\100pimb.org
++                                       lists-p5p\100pimb.org
 djberg86\100attbi.com                   djberg96\100attbi.com
 domo\100computer.org                    shouldbedomo\100mac.com
 +                                       domo\100slipper.ip.lu
index e50bb39..0314952 100644 (file)
@@ -1,3 +1,5 @@
+=encoding utf8
+
 =head1 NAME
 
 perl5120delta - what is new for perl v5.12.0
@@ -1897,9 +1899,7 @@ F<t/op/reg_posixcc.t> checks that POSIX character classes behave consistently.
 
 =item *
 
-F<t/op/re.t>
-
-checks that exportable C<re> functions in F<universal.c> work.
+F<t/op/re.t> checks that exportable C<re> functions in F<universal.c> work.
 
 =item *
 
@@ -2715,7 +2715,7 @@ Perl should now build on MirOS BSD.
 
 =over
 
-=item DomainOS
+=item Domain/OS
 
 =item MiNT