subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1471504 - /subversion/trunk/tools/dist/backport.pl
Date Wed, 24 Apr 2013 16:14:53 GMT
Author: danielsh
Date: Wed Apr 24 16:14:53 2013
New Revision: 1471504

URL: http://svn.apache.org/r1471504
Log:
Teach backport.pl to parse non-approved entries, too.

* tools/dist/backport.pl
  (handle_entry): In $YES mode, skip non-approved entries.
  (main): Parse both approved and non-approved entries, noting which is which.

Modified:
    subversion/trunk/tools/dist/backport.pl

Modified: subversion/trunk/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/backport.pl?rev=1471504&r1=1471503&r2=1471504&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Wed Apr 24 16:14:53 2013
@@ -219,11 +219,12 @@ sub parse_entry {
 }
 
 sub handle_entry {
+  my $in_approved = shift;
   my %entry = parse_entry @_;
   my @vetoes = grep { /^  -1:/ } @{$entry{votes}};
 
   if ($YES) {
-    merge %entry unless @vetoes;
+    merge %entry if $in_approved and not @vetoes;
   } else {
     print "";
     print "\n>>> The $entry{header}:";
@@ -260,13 +261,11 @@ sub main {
 
   # Skip most of the file
   while (<STATUS>) {
-    last if /^Approved changes/;
-  }
-  while (<STATUS>) {
-    last unless /^=+$/;
+    last if /^Status of \d+\.\d+/;
   }
   $/ = ""; # paragraph mode
 
+  my $in_approved = 0;
   while (<STATUS>) {
     my @lines = split /\n/;
 
@@ -274,6 +273,7 @@ sub main {
       # Section header
       when (/^[A-Z].*:$/i) {
         print "\n\n=== $lines[0]" unless $YES;
+        $in_approved = $lines[0] =~ /^Approved changes/;
       }
       # Separator after section header
       when (/^=+$/i) {
@@ -283,7 +283,7 @@ sub main {
       when (/^ \*/) {
         warn "Too many bullets in $lines[0]" and next
           if grep /^ \*/, @lines[1..$#lines];
-        handle_entry @lines;
+        handle_entry $in_approved, @lines;
       }
       default {
         warn "Unknown entry '$lines[0]' at line $.\n";



Mime
View raw message