]> git.madduck.net Git - code/myrepos.git/commitdiff

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 -i option to start a shell if an operation fails. Closes: #474962
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 8 Apr 2008 17:55:01 +0000 (13:55 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 8 Apr 2008 17:55:01 +0000 (13:55 -0400)
debian/changelog
mr

index c36c9608c4b13384fabb3d21b56561fab053aae0..757652cdddf81905219a57e016521f904693e978 100644 (file)
@@ -1,3 +1,9 @@
+mr (0.26) UNRELEASED; urgency=low
+
+  * Add -i option to start a shell if an operation fails. Closes: #474962
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 08 Apr 2008 13:54:35 -0400
+
 mr (0.25) unstable; urgency=low
 
   * git-fake-bare: Add support for diff, commit, and record. (madduck)
diff --git a/mr b/mr
index 412209dd530f6c2d5133e868f58b4ce2317081e7..4c7be3d3748a0e75d8ea0ff4a134bec5019a0fea 100755 (executable)
--- a/mr
+++ b/mr
@@ -167,6 +167,12 @@ Be quiet.
 Expand the statistics line displayed at the end to include information
 about exactly which repositories failed and were skipped, if any.
 
+=item -i
+
+Interactive mode. If a repository fails to be processed, a subshell will be
+started which you can use to resolve or investigate the problem. Exit the
+subshell to continue the mr run.
+
 =item -n [number]
 
 If no number if specified, just operate on the repository for the current
@@ -333,6 +339,7 @@ my $config_overridden=0;
 my $verbose=0;
 my $quiet=0;
 my $stats=0;
+my $interactive=0;
 my $max_depth;
 my $no_chdir=0;
 my $jobs=1;
@@ -598,6 +605,11 @@ sub record { #{{{
                print "\n";
        }
        elsif ($ret == FAILED) {
+               if ($interactive) {
+                       chdir($dir) unless $no_chdir;
+                       print STDERR "mr: starting interactive shell. Exit shell to continue.\n";
+                       system((getpwuid($<))[8]);
+               }
                push @failed, $dir;
                print "\n";
        }
@@ -1072,6 +1084,7 @@ sub getopts { #{{{
                "v|verbose" => \$verbose,
                "q|quiet" => \$quiet,
                "s|stats" => \$stats,
+               "i|interactive" => \$interactive,
                "n|no-recurse:i" => \$max_depth,
                "j|jobs:i" => \$jobs,
        );