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 2014/05/06 13:11:53 UTC

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

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($) {