Author: svn-role
Date: Thu Mar 28 21:37:20 2013
New Revision: 1462316

URL: http://svn.apache.org/r1462316
Log:
backport.pl: Fix a bug with current 1.7.x/STATUS whereby it would hang trying
to read from stdin.

* tools/dist/backport.pl
  (main): Do away with ARGV magic.

Found by: breser

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=1462316&r1=1462315&r2=1462316&view=diff
==============================================================================
--- subversion/trunk/tools/dist/backport.pl (original)
+++ subversion/trunk/tools/dist/backport.pl Thu Mar 28 21:37:20 2013
@@ -223,7 +223,8 @@ sub handle_entry {
 
 sub main {
   usage, exit 0 if @ARGV;
-  usage, exit 1 unless -r $STATUS;
+
+  open STATUS, "<", $STATUS or (usage, exit 1);
 
   # Because we use the ':normal' command in Vim...
   die "A vim with the +ex_extra feature is required"
@@ -232,18 +233,17 @@ sub main {
   # ### TODO: need to run 'revert' here
   # ### TODO: both here and in merge(), unlink files that previous merges added
   die "Local mods to STATUS file $STATUS" if `$SVN status -q $STATUS`;
-  @ARGV = $STATUS;
 
   # Skip most of the file
-  while (<>) {
+  while (<STATUS>) {
     last if /^Approved changes/;
   }
-  while (<>) {
+  while (<STATUS>) {
     last unless /^=+$/;
   }
   $/ = ""; # paragraph mode
 
-  while (<>) {
+  while (<STATUS>) {
     my @lines = split /\n/;
 
     given ($lines[0]) {


Reply via email to