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 2011/07/20 21:18:41 UTC
svn commit: r1148907 - /subversion/trunk/tools/dist/backport.pl
Author: danielsh
Date: Wed Jul 20 19:18:40 2011
New Revision: 1148907
URL: http://svn.apache.org/viewvc?rev=1148907&view=rev
Log:
* tools/dist/backport.pl:
Compute a header for revision-less branch entries, and add some error checking to
generating the commit message.
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=1148907&r1=1148906&r2=1148907&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Wed Jul 20 19:18:40 2011
@@ -69,7 +69,7 @@ sub merge {
$mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
print $logmsg_fh "Reintergrate the $BRANCHES/$entry{branch} branch:";
print $logmsg_fh "";
- } else {
+ } elsif (@{$entry{revisions}}) {
$mergeargs = join " ", (map { "-c$_" } @{$entry{revisions}}), '^/subversion/trunk';
if (@{$entry{revisions}} > 1) {
print $logmsg_fh "Merge the r$entry{revisions}->[0] group from trunk:";
@@ -78,6 +78,8 @@ sub merge {
print $logmsg_fh "Merge r$entry{revisions}->[0] from trunk:";
print $logmsg_fh "";
}
+ } else {
+ die "Don't know how to call $entry{header}";
}
print $logmsg_fh $_ for @{$entry{entry}};
close $logmsg_fh or die "Can't close $logmsg_filename: $!";
@@ -147,10 +149,17 @@ sub parse_entry {
$branch = sanitize_branch (shift || shift || die "Branch header found without value");
}
+ # Compute a header.
+ my $header;
+ $header = "r$revisions[0] group" if @revisions;
+ $header = "$branch branch" if $branch;
+ warn "No header for [@lines]" unless $header;
+
return (
revisions => [@revisions],
logsummary => [@logsummary],
branch => $branch,
+ header => $header,
votes => [@votes],
entry => [@lines],
);
@@ -160,7 +169,7 @@ sub handle_entry {
my %entry = parse_entry @_;
print "";
- print "\n>>> The r$entry{revisions}->[0] group:";
+ print "\n>>> The $entry{header}:";
print join ", ", map { "r$_" } @{$entry{revisions}};
print "$BRANCHES/$entry{branch}" if $entry{branch};
print "";