projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We need to make Parser.y and Config.hs earlier
[ghc-hetmet.git]
/
darcs-all
diff --git
a/darcs-all
b/darcs-all
index
7743e8a
..
d25a903
100644
(file)
--- a/
darcs-all
+++ b/
darcs-all
@@
-11,8
+11,10
@@
chomp $defaultrepo;
my $defaultrepo_base;
my $defaultrepo_lib;
my $defaultrepo_base;
my $defaultrepo_lib;
-if ($defaultrepo =~ /:/) {
+if ($defaultrepo =~ /^...*:/) {
# HTTP or SSH
# HTTP or SSH
+ # Above regex says "at least two chars before the :", to avoid
+ # catching Win32 drives ("C:\").
$defaultrepo_base = $defaultrepo;
$defaultrepo_base =~ s#/[^/]+/?$##;
$defaultrepo_lib = "$defaultrepo_base/packages";
$defaultrepo_base = $defaultrepo;
$defaultrepo_base =~ s#/[^/]+/?$##;
$defaultrepo_lib = "$defaultrepo_base/packages";
@@
-31,7
+33,7
@@
else {
die "Couldn't work out defaultrepo";
}
die "Couldn't work out defaultrepo";
}
-my $verbose = 1;
+my $verbose = 2;
my $ignore_failure = 0;
# --extra says we grab the extra libs with 'get'. It has no effect on
my $ignore_failure = 0;
# --extra says we grab the extra libs with 'get'. It has no effect on
@@
-43,13
+45,15
@@
my $nofib = 0;
my $testsuite = 0;
sub message {
my $testsuite = 0;
sub message {
- if ($verbose) {
+ if ($verbose >= 2) {
print "@_\n";
}
}
sub warning {
print "@_\n";
}
}
sub warning {
- print "warning: @_\n";
+ if ($verbose >= 1) {
+ print "warning: @_\n";
+ }
}
sub darcs {
}
sub darcs {
@@
-60,6
+64,7
@@
sub darcs {
}
sub darcsall {
}
sub darcsall {
+ my @packages;
darcs @_;
for my $dir (@top_dirs) {
if (-d $dir && -d "$dir/_darcs") {
darcs @_;
for my $dir (@top_dirs) {
if (-d $dir && -d "$dir/_darcs") {
@@
-69,12
+74,21
@@
sub darcsall {
message "== $dir not present or not a repository; skipping";
}
}
message "== $dir not present or not a repository; skipping";
}
}
- for my $pkg (`cat libraries/core-packages libraries/extra-packages`) {
- chomp $pkg;
- if (-d "libraries/$pkg") {
+ for my $path (<libraries/*/_darcs>) {
+ chomp $path;
+ if ($path =~ m#/(.*)/#) {
+ my $pkg = $1;
darcs (@_, "--repodir", "libraries/$pkg");
}
else {
darcs (@_, "--repodir", "libraries/$pkg");
}
else {
+ die "that pattern can't fail!";
+ }
+ }
+ @packages = `cat libraries/boot-packages`;
+ # @packages = `cat libraries/boot-packages libraries/extra-packages`;
+ for my $pkg (@packages) {
+ chomp $pkg;
+ if (! -d "libraries/$pkg") {
warning("$pkg doesn't exist, use 'darcs-all get' to get it");
}
}
warning("$pkg doesn't exist, use 'darcs-all get' to get it");
}
}
@@
-110,10
+124,10
@@
sub darcsget {
my @packages;
if ($extra) {
my @packages;
if ($extra) {
- @packages = `cat core-packages extra-packages`;
+ @packages = `cat boot-packages extra-packages`;
}
else {
}
else {
- @packages = `cat core-packages`;
+ @packages = `cat boot-packages`;
}
for my $pkg (@packages) {
}
for my $pkg (@packages) {
@@
-132,6
+146,9
@@
sub main {
# We handle -q here as well as lower down as we need to skip over it
# if it comes before the darcs command
if ($arg eq "-q") {
# We handle -q here as well as lower down as we need to skip over it
# if it comes before the darcs command
if ($arg eq "-q") {
+ $verbose = 1;
+ }
+ elsif ($arg eq "-s") {
$verbose = 0;
}
elsif ($arg eq "--extra") {
$verbose = 0;
}
elsif ($arg eq "--extra") {
@@
-146,7
+163,7
@@
sub main {
else {
unshift @_, $arg;
if (grep /^-q$/, @_) {
else {
unshift @_, $arg;
if (grep /^-q$/, @_) {
- $verbose = 0;
+ $verbose = 1;
}
last;
}
}
last;
}