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 2013/07/27 19:08:45 UTC

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

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";