subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1606355 - /subversion/trunk/tools/dist/backport.pl
Date Sat, 28 Jun 2014 13:43:46 GMT
Author: danielsh
Date: Sat Jun 28 13:43:45 2014
New Revision: 1606355

URL: http://svn.apache.org/r1606355
Log:
backport.pl: internal improvement.  No user-facing change.

* tools/dist/backport.pl
  ($AVAILID): Open a file directly, rather than via a subshell.

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=1606355&r1=1606354&r2=1606355&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Sat Jun 28 13:43:45 2014
@@ -70,9 +70,13 @@ my ($AVAILID) = $ENV{AVAILID} // do {
   ($? == 0 && /Auth.*realm: \Q$SVN_A_O_REALM\E\nUsername: (.*)/) ? $1 : undef
 } // do {
   local $/; # slurp mode
+  my $fh;
+  my $dir = "$ENV{HOME}/.subversion/auth/svn.simple/";
   my $filename = Digest->new("MD5")->add($SVN_A_O_REALM)->hexdigest;
-  `cat $ENV{HOME}/.subversion/auth/svn.simple/$filename`
-  =~ /K 8\nusername\nV \d+\n(.*)/ and $1 or undef
+  open $fh, '<', "$dir/$filename"
+  and <$fh> =~ /K 8\nusername\nV \d+\n(.*)/
+  ? $1
+  : undef
 };
 
 unless (defined $AVAILID) {



Mime
View raw message