You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/02/12 05:03:52 UTC

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

Author: breser
Date: Wed Feb 12 04:03:51 2014
New Revision: 1567519

URL: http://svn.apache.org/r1567519
Log:
backport.pl: Avoid problems like Bert fixed in r1567239.

That problem was created by a revision not being prefixed by r.  So don't
require that.

Additional unreliability existed since the code used the r prefix to decide
if a line was a revision line and the revision list can wrap to the next line.
However, the logsummary line is difficult to distinguish from a wrapped revision
list.  So now we only treat a line as a revision list if all characters are used
up in calculating the revision list.  This also means if the first line used as
a revision list doesn't match the pattern then no revisions will be matched and
the line will error about having neither revisions or branch.  There is still
one ambiguous case.  If a revision list wraps and has some extra garbage in it,
it'll be treated as the log summary.  Can't really fix that without changing
the format.

* tools/dist/backport.pl
  (parse_entry): Revision lines match all characters following the repeating
    pattern we're using.  The r prefix is optional.

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=1567519&r1=1567518&r2=1567519&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Wed Feb 12 04:03:51 2014
@@ -356,9 +356,9 @@ sub parse_entry {
   $branch = sanitize_branch $1
     and shift
     if $_[0] =~ /^(\S*) branch$/ or $_[0] =~ m#branches/(\S+)#;
-  while ($_[0] =~ /^r/) {
+  while ($_[0] =~ /^(?:r?\d+[,; ]*)+$/) {
     my $sawrevnum = 0;
-    while ($_[0] =~ s/^r(\d+)(?:$|[,; ]+)//) {
+    while ($_[0] =~ s/^r?(\d+)(?:$|[,; ]+)//) {
       push @revisions, $1;
       $sawrevnum++;
     }