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/04 17:25:43 UTC

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

Author: danielsh
Date: Sat Feb  4 16:25:42 2012
New Revision: 1240533

URL: http://svn.apache.org/viewvc?rev=1240533&view=rev
Log:
Behave the caller.

* tools/dist/backport.pl
    Pass --non-interactive when there is no controlling terminal.

Suggested by: stsp

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=1240533&r1=1240532&r2=1240533&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Sat Feb  4 16:25:42 2012
@@ -22,6 +22,7 @@ use feature qw/switch say/;
 
 use Term::ReadKey qw/ReadMode ReadKey/;
 use File::Temp qw/tempfile/;
+use POSIX qw/ctermid/;
 
 $/ = ""; # paragraph mode
 
@@ -33,7 +34,12 @@ my $BRANCHES = '^/subversion/branches';
 my $YES = $ENV{YES}; # batch mode: assume 'yes' without asking
 my $WET_RUN = qw[false true][1]; # don't commit
 my $DEBUG = qw[false true][0]; # 'set -x', etc
-my $SVNq = "$SVN -q ";
+
+# derived values
+my $SVNq;
+
+$SVN .= " --non-interactive" unless defined ctermid;
+$SVNq = "$SVN -q ";
 $SVNq =~ s/-q// if $DEBUG eq 'true';
 
 sub usage {