subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1507692 - /subversion/trunk/tools/dist/backport.pl
Date Sat, 27 Jul 2013 17:08:45 GMT
Author: danielsh
Date: Sat Jul 27 17:08:44 2013
New Revision: 1507692

URL: http://svn.apache.org/r1507692
Log:
Followup to r1507667:

* tools/dist/backport.pl
  ($AVAILID): Only use $1 if it was set by the immediately-preceding match.

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=1507692&r1=1507691&r2=1507692&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Sat Jul 27 17:08:44 2013
@@ -53,13 +53,13 @@ my $DEBUG = (exists $ENV{DEBUG}) ? 'true
 my $SVN_A_O_REALM = '<https://svn.apache.org:443> ASF Committers';            
 my ($AVAILID) = $ENV{AVAILID} // do {
   local $_ = `$SVNAUTH list 2>/dev/null`;
-  ($? == 0) ? (/Auth.*realm: \Q$SVN_A_O_REALM\E\nUsername: (.*)/, $1) : undef
+  ($? == 0 && /Auth.*realm: \Q$SVN_A_O_REALM\E\nUsername: (.*)/) ? $1 : undef
 } // do {
   local $/; # slurp mode
   my $filename = Digest->new("MD5")->add($SVN_A_O_REALM)->hexdigest;
-  open USERNAME, '<', "$ENV{HOME}/.subversion/auth/svn.simple/$filename"
+  open(USERNAME, '<', "$ENV{HOME}/.subversion/auth/svn.simple/$filename")
   and
-  (<USERNAME> =~ /K 8\nusername\nV \d+\n(.*)/, $1)
+  <USERNAME> =~ /K 8\nusername\nV \d+\n(.*)/ and $1 or undef
 }
 // warn "Username for commits (of votes/merges) not found";
 



Mime
View raw message