my $tag;
my @repos;
my $command = $_[0];
+ my $line;
my ($repo_base, $checked_out_tree) = getrepo();
@repos = <IN>;
close IN;
+ $line = 0;
foreach (@repos) {
chomp;
- if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
+ $line++;
+ if (/^([^# ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) {
$localpath = $1;
- $tag = defined($2) ? $2 : "";
+ $tag = $2;
$remotepath = $3;
if ($checked_out_tree) {
darcs (@_, "--repodir", $localpath);
}
}
- elsif ($tag eq "") {
+ elsif ($tag eq "-") {
message "== Required repo $localpath is missing! Skipping";
}
else {
}
}
elsif (! /^(#.*)?$/) {
- die "Bad line: $_";
+ die "Bad content on line $line of packages file: $_";
}
}
}
my $path;
my $tag;
my @repos;
+ my $line;
my ($repo_base, $checked_out_tree) = getrepo();
@repos = <IN>;
close IN;
+ $line = 0;
foreach (@repos) {
chomp;
- if (/^([^ ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
+ $line++;
+ if (/^([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) {
$localpath = $1;
- $tag = defined($2) ? $2 : "";
+ $tag = $2;
$remotepath = $3;
if ($checked_out_tree) {
$path = "$repo_base/$remotepath";
}
- if (($tag eq "") || defined($tags{$tag})) {
+ if (($tag eq "-") || defined($tags{$tag})) {
if (-d $localpath) {
warning("$localpath already present; omitting");
}
}
}
elsif (! /^(#.*)?$/) {
- die "Bad line: $_";
+ die "Bad content on line $line of packages file: $_";
}
}
}