Author: danielsh
Date: Wed Jul 3 19:25:31 2013
New Revision: 1499529
URL: http://svn.apache.org/r1499529
Log:
backport.pl: preserve STATUS in interactive mode.
* tools/dist/backport.pl
(File::Copy): New dependency module.
(maybe_revert): Be smarter about (not) reverting STATUS.
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=1499529&r1=1499528&r2=1499529&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Wed Jul 3 19:25:31 2013
@@ -3,6 +3,8 @@ use warnings;
use strict;
use feature qw/switch say/;
+use File::Copy qw/copy move/;
+
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -286,7 +288,11 @@ sub handle_entry {
sub maybe_revert {
# This is both a SIGINT handler, and the tail end of main() in normal runs.
- system $SVN, qw/revert -R ./ if !$YES and prompt 'Revert? ';
+ return if $YES or not prompt 'Revert? ';
+ copy $STATUS, "$STATUS.$$";
+ system $SVN, qw/revert -q/, $STATUS;
+ system $SVN, qw/revert -R ./;
+ move "$STATUS.$$", $STATUS;
exit if @_;
}