subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1512393 - /subversion/trunk/tools/dist/backport.pl
Date Fri, 09 Aug 2013 16:59:55 GMT
Author: danielsh
Date: Fri Aug  9 16:59:55 2013
New Revision: 1512393

URL: http://svn.apache.org/r1512393
Log:
* tools/dist/nominate.pl
  (nominate_main): Handle log messages with no preamble, such as this one.

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=1512393&r1=1512392&r2=1512393&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Fri Aug  9 16:59:55 2013
@@ -150,7 +150,6 @@ to STATUS.  Backport branches are detect
 EOF
 # TODO: Optionally add a "Notes" section.
 # TODO: Look for backport branches named after issues.
-# TODO: Handle log messages such as "* file.c: Change."
 }
 
 sub digest_string {
@@ -861,9 +860,16 @@ sub nominate_main {
   my $logmsg = `$SVN propget --revprop -r $revnums[0] --strict svn:log '^/'`;
   die "Can't fetch log message of r$revnums[0]: $!" unless $logmsg;
   
+  unless ($logmsg =~ s/^(.*?)\n\n.*/$1/s) {
+    # "* file\n  (symbol): Log message."
+    $logmsg =~ s/^.*?: //s;
+    $logmsg =~ s/^  \x28.*//ms;
+    $logmsg =~ s/\s*\n\s+/ /g;
+  }
+
   my @lines;
   push @lines, wrap " * ", ' 'x3, join ', ', map "r$_", @revnums;
-  push @lines, wrap ' 'x3, ' 'x3, ($logmsg =~ /^(.*?)\n\n/s);
+  push @lines, wrap ' 'x3, ' 'x3, $logmsg;
   push @lines, "   Justification:";
   push @lines, wrap ' 'x5, ' 'x5, $justification;
   push @lines, "   Branch: $branch" if defined $branch;



Mime
View raw message