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 2012/02/02 15:04:28 UTC
svn commit: r1239624 - /subversion/trunk/tools/dist/backport.pl
Author: danielsh
Date: Thu Feb 2 14:04:27 2012
New Revision: 1239624
URL: http://svn.apache.org/viewvc?rev=1239624&view=rev
Log:
* tools/dist/backport.pl
(handle_entry): Cleanly separate the 'Always-yes' and interactive cases,
with the side effect of not printing in the former.
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=1239624&r1=1239623&r2=1239624&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Thu Feb 2 14:04:27 2012
@@ -185,20 +185,25 @@ sub handle_entry {
my %entry = parse_entry @_;
my @vetoes = grep { /^ -1:/ } @{$entry{votes}};
- print "";
- print "\n>>> The $entry{header}:";
- print join ", ", map { "r$_" } @{$entry{revisions}};
- print "$BRANCHES/$entry{branch}" if $entry{branch};
- print "";
- print for @{$entry{logsummary}};
- print "";
- print for @{$entry{votes}};
- print "";
- print "Vetoes found!" if @vetoes;
+ if ($ENV{YES}) {
+ merge %entry unless @vetoes;
+ } else {
+ print "";
+ print "\n>>> The $entry{header}:";
+ print join ", ", map { "r$_" } @{$entry{revisions}};
+ print "$BRANCHES/$entry{branch}" if $entry{branch};
+ print "";
+ print for @{$entry{logsummary}};
+ print "";
+ print for @{$entry{votes}};
+ print "";
+ print "Vetoes found!" if @vetoes;
- # TODO: this changes ./STATUS, which we're reading below, but
+ merge %entry if prompt;
+ }
+
+ # TODO: merge() changes ./STATUS, which we're reading below, but
# on my system the loop in main() doesn't seem to care.
- merge %entry if $ENV{YES} ? !@vetoes : prompt;
1;
}