]> git.madduck.net Git - code/myrepos.git/blobdiff - mr

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add -s option
[code/myrepos.git] / mr
diff --git a/mr b/mr
index adc05464671b0644be5e04b2b8167c6b89202cb6..4e3d73889b3080816fb9659761cd429f24baf0ce 100755 (executable)
--- 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;
 }