X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=darcs-all;h=5e7872946835ce2b1a3c540c24cb2f6fd31f4a50;hb=7cc35327fd1acde88f3474d4e4727f8d8185ff67;hp=6c8b406cf3816d9cec4e254233f5063fc8b54205;hpb=4260f0c9b38d9b8b5851eae021d0a45a90719ef0;p=ghc-hetmet.git diff --git a/darcs-all b/darcs-all index 6c8b406..5e78729 100644 --- a/darcs-all +++ b/darcs-all @@ -55,9 +55,13 @@ sub darcsall { my $localpath; my $path; my $tag; + my @repos; open IN, "< packages" or die "Can't open packages file"; - while () { + @repos = ; + close IN; + + foreach (@repos) { chomp; if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) { $localpath = $1; @@ -77,7 +81,6 @@ sub darcsall { die "Bad line: $_"; } } - close IN; } sub darcsget { @@ -86,6 +89,7 @@ sub darcsget { my $remotepath; my $path; my $tag; + my @repos; if (! grep /(?:--complete|--partial)/, @_) { warning("adding --partial, to override use --complete"); @@ -96,7 +100,10 @@ sub darcsget { } open IN, "< packages" or die "Can't open packages file"; - while () { + @repos = ; + close IN; + + foreach (@repos) { chomp; if (/^([^ ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) { $localpath = $1; @@ -107,7 +114,12 @@ sub darcsget { $path = "$defaultrepo_base/$localpath"; } else { - $path = "$defaultrepo_base/$remotepath"; + if ($remotepath =~ /^http:/) { + $path = $remotepath; + } + else { + $path = "$defaultrepo_base/$remotepath"; + } } if (($tag eq "") || defined($tags{$tag})) { @@ -123,7 +135,6 @@ sub darcsget { die "Bad line: $_"; } } - close IN; } sub main {