diff options
author | Ian Lynagh <igloo@earth.li> | 2008-08-25 14:59:08 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-08-25 14:59:08 +0000 |
commit | 29e0999a73665a37c0c3fd311ac961f81c50bb92 (patch) | |
tree | 91490ce7d9060604393ae5e4afb8a5c8be1ce83a /push-all | |
parent | b4e88b1999b29c14668df90564fc0d3c89d94120 (diff) | |
download | haskell-29e0999a73665a37c0c3fd311ac961f81c50bb92.tar.gz |
Read the packages file in strictly in darcs-all and push-all
This fixes a problem where darcs tries to update it while perl has it
open. On Windows this fails. Spotted by Claus Reinke.
Diffstat (limited to 'push-all')
-rw-r--r-- | push-all | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -39,9 +39,13 @@ sub pushall { my $remotepath; my $path; my $tag; + my @repos; open IN, "< packages" or die "Can't open packages file"; - while (<IN>) { + @repos = <IN>; + close IN; + + foreach (@repos) { chomp; if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) { $localpath = $1; @@ -69,7 +73,6 @@ sub pushall { die "Bad line: $_"; } } - close IN; } sub main { |