subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1592713 - /subversion/trunk/tools/dist/backport.pl
Date Tue, 06 May 2014 11:11:53 GMT
Author: danielsh
Date: Tue May  6 11:11:53 2014
New Revision: 1592713

URL: http://svn.apache.org/r1592713
Log:
* tools/dist/backport.pl
  (shell_escape): Return a scalar when not in list context.  Before this,
    the first call in merge() sometimes got '1' instead of the branch name.

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=1592713&r1=1592712&r2=1592713&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Tue May  6 11:11:53 2014
@@ -232,11 +232,12 @@ sub prompt {
 #     >>> shell_escape(q[foo'bar]) eq q['foo'\''bar']
 #     True
 sub shell_escape {
-  map {
+  my (@reply) = map {
     local $_ = $_; # the LHS $_ is mutable; the RHS $_ may not be.
     s/\x27/'\\\x27'/g;
     "'$_'"
-  } @_
+  } @_;
+  wantarray ? @reply : $reply[0]
 }
 
 sub shell_safe_path_or_url($) {



Mime
View raw message