X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=darcs-all;h=b4ba47e8a9a0f4c6474a4596f0d8a1c33613243f;hb=34bb2bb9114fe35fc743b67254c6db7c3097dc72;hp=c97729dfe9fb137f38edbb71271596b513e5438d;hpb=93eb0f3f3628e0c9dbc733ba1fc3279478e418fa;p=ghc-hetmet.git diff --git a/darcs-all b/darcs-all index c97729d..b4ba47e 100644 --- a/darcs-all +++ b/darcs-all @@ -157,6 +157,7 @@ sub darcsall { my $tag; my @repos; my $command = $_[0]; + my $line; my ($repo_base, $checked_out_tree) = getrepo(); @@ -164,11 +165,13 @@ sub darcsall { @repos = ; close IN; + $line = 0; foreach (@repos) { chomp; - if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) { + $line++; + if (/^([^# ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) { $localpath = $1; - $tag = defined($2) ? $2 : ""; + $tag = $2; $remotepath = $3; if ($checked_out_tree) { @@ -190,7 +193,7 @@ sub darcsall { darcs (@_, "--repodir", $localpath); } } - elsif ($tag eq "") { + elsif ($tag eq "-") { message "== Required repo $localpath is missing! Skipping"; } else { @@ -198,7 +201,7 @@ sub darcsall { } } elsif (! /^(#.*)?$/) { - die "Bad line: $_"; + die "Bad content on line $line of packages file: $_"; } } } @@ -210,6 +213,7 @@ sub darcsget { my $path; my $tag; my @repos; + my $line; my ($repo_base, $checked_out_tree) = getrepo(); @@ -225,11 +229,13 @@ sub darcsget { @repos = ; close IN; + $line = 0; foreach (@repos) { chomp; - if (/^([^ ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) { + $line++; + if (/^([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) { $localpath = $1; - $tag = defined($2) ? $2 : ""; + $tag = $2; $remotepath = $3; if ($checked_out_tree) { @@ -239,7 +245,7 @@ sub darcsget { $path = "$repo_base/$remotepath"; } - if (($tag eq "") || defined($tags{$tag})) { + if (($tag eq "-") || defined($tags{$tag})) { if (-d $localpath) { warning("$localpath already present; omitting"); } @@ -249,7 +255,7 @@ sub darcsget { } } elsif (! /^(#.*)?$/) { - die "Bad line: $_"; + die "Bad content on line $line of packages file: $_"; } } } @@ -322,6 +328,8 @@ sub main { } END { + my $ec = $?; + message "== Checking for old bytestring repo"; if (-d "libraries/bytestring/_darcs") { if ((system "darcs annotate --repodir libraries/bytestring --match 'hash 20080118173113-3fd76-d5b74c04372a297b585ebea4e16d524551ce5035' > /dev/null 2> /dev/null") == 0) { @@ -338,6 +346,20 @@ EOF } } + message "== Checking for bytestring tarball"; + if (-d "libraries/bytestring" && not -d "libraries/bytestring/_darcs") { + print < /dev/null 2> /dev/null") == 0) { print <