Commit a28ba79a authored by Ian Lynagh's avatar Ian Lynagh

Give darcs-all a -s (silent) flag

parent d5938fb2
...@@ -31,7 +31,7 @@ else { ...@@ -31,7 +31,7 @@ else {
die "Couldn't work out defaultrepo"; die "Couldn't work out defaultrepo";
} }
my $verbose = 1; my $verbose = 2;
my $ignore_failure = 0; my $ignore_failure = 0;
# --extra says we grab the extra libs with 'get'. It has no effect on # --extra says we grab the extra libs with 'get'. It has no effect on
...@@ -43,13 +43,15 @@ my $nofib = 0; ...@@ -43,13 +43,15 @@ my $nofib = 0;
my $testsuite = 0; my $testsuite = 0;
sub message { sub message {
if ($verbose) { if ($verbose >= 2) {
print "@_\n"; print "@_\n";
} }
} }
sub warning { sub warning {
print "warning: @_\n"; if ($verbose >= 1) {
print "warning: @_\n";
}
} }
sub darcs { sub darcs {
...@@ -132,6 +134,9 @@ sub main { ...@@ -132,6 +134,9 @@ sub main {
# We handle -q here as well as lower down as we need to skip over it # We handle -q here as well as lower down as we need to skip over it
# if it comes before the darcs command # if it comes before the darcs command
if ($arg eq "-q") { if ($arg eq "-q") {
$verbose = 1;
}
elsif ($arg eq "-s") {
$verbose = 0; $verbose = 0;
} }
elsif ($arg eq "--extra") { elsif ($arg eq "--extra") {
...@@ -146,7 +151,7 @@ sub main { ...@@ -146,7 +151,7 @@ sub main {
else { else {
unshift @_, $arg; unshift @_, $arg;
if (grep /^-q$/, @_) { if (grep /^-q$/, @_) {
$verbose = 0; $verbose = 1;
} }
last; last;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment