From: Joey Hess Date: Tue, 16 Oct 2007 06:13:42 +0000 (-0400) Subject: add -s option X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/e22fe74433ab01147baa7450b0d4686498b6ba18 add -s option --- diff --git a/debian/changelog b/debian/changelog index ea49785..c6a9bcc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ mr (0.2) UNRELEASED; urgency=low * Fix line number display for config file parse errors. * Fix a bug in inheritance of default settings in chained .mrconfig files. + * Add the -s options. - -- Joey Hess Tue, 16 Oct 2007 01:40:32 -0400 + -- Joey Hess Tue, 16 Oct 2007 02:13:31 -0400 mr (0.1) unstable; urgency=low diff --git a/mr b/mr index adc0546..4e3d738 100755 --- a/mr +++ b/mr @@ -138,6 +138,11 @@ directory. Be verbose. +=item -s + +Expand the statistics line displayed at the end to include information +about exactly which repositories failed and were skipped, if any. + =back =head1 FILES @@ -245,6 +250,7 @@ use Cwd qw(getcwd abs_path); my $directory=getcwd(); my $config="$ENV{HOME}/.mrconfig"; my $verbose=0; +my $stats=0; my %config; my %knownactions; my %alias; @@ -253,7 +259,8 @@ Getopt::Long::Configure("no_permute"); my $result=GetOptions( "d|directory=s" => sub { $directory=abs_path($_[1]) }, "c|config=s" => \$config, - "verbose" => \$verbose, + "v|verbose" => \$verbose, + "s|stats" => \$stats, ); if (! $result || @ARGV < 1) { die("Usage: mr [-d directory] action [params ...]\n". @@ -479,6 +486,14 @@ print "mr $action: finished (".join("; ", showstat($#failed+1, "failed", "failed"), showstat($#skipped+1, "skipped", "skipped"), ).")\n"; +if ($stats) { + if (@skipped) { + print "mr $action: (skipped: ".join(" ", @skipped).")\n"; + } + if (@failed) { + print "mr $action: (failed: ".join(" ", @failed).")\n"; + } +} if (@failed) { exit 1; }