You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/07/07 17:26:39 UTC

svn commit: r1500453 - /subversion/trunk/tools/dist/backport.pl

Author: danielsh
Date: Sun Jul  7 15:26:39 2013
New Revision: 1500453

URL: http://svn.apache.org/r1500453
Log:
backport.pl: Fix voting/approving

* tools/dist/backport.pl
  (vote): Add an empty line where needed.
  (handle_entry): Fix argv parsing.  (It worked before...)

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=1500453&r1=1500452&r2=1500453&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Sun Jul  7 15:26:39 2013
@@ -311,10 +311,13 @@ sub vote {
   my @votes;
   return unless %$approved or %$votes;
 
+  my $had_empty_line;
+
   $. = 0;
   open STATUS, "<", $STATUS;
   open VOTES, ">", "$STATUS.$$.tmp";
   while (<STATUS>) {
+    $had_empty_line = /\n\n\z/;
     unless (exists $votes->{$.}) {
       (exists $approved->{$.}) ? ($raw_approved .= $_) : (print VOTES);
       next;
@@ -336,6 +339,7 @@ sub vote {
     (exists $approved->{$.}) ? ($raw_approved .= $_) : (print VOTES);
   }
   close STATUS;
+  print VOTES "\n" unless $had_empty_line;
   print VOTES $raw_approved;
   close VOTES;
   die "Some vote chunks weren't found: "
@@ -405,8 +409,8 @@ sub exit_stage_left {
 
 sub handle_entry {
   my $in_approved = shift;
-  my $votes = shift;
   my $approved = shift;
+  my $votes = shift;
   my $lines = shift;
   my %entry = parse_entry $lines, @_;
   my @vetoes = grep { /^  -1:/ } @{$entry{votes}};