X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/974251824556a96bd670d48c2ffcf4c0a9c12426..8e2f0e9b26f076d144fe5ff9e657f477db648db3:/mr diff --git a/mr b/mr index 412209d..d4622d9 100755 --- 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, ); @@ -1194,7 +1207,7 @@ git_status = git status "$@" || true bzr_status = bzr status "$@" cvs_status = cvs status "$@" hg_status = hg status "$@" -darcs_status = darcs whatsnew -ls "$@" +darcs_status = darcs whatsnew -ls "$@" || true svn_commit = svn commit "$@" git_commit = git commit -a "$@" && git push --all