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
my $verbose=0;
my $quiet=0;
my $stats=0;
+my $interactive=0;
my $max_depth;
my $no_chdir=0;
my $jobs=1;
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";
}
"v|verbose" => \$verbose,
"q|quiet" => \$quiet,
"s|stats" => \$stats,
+ "i|interactive" => \$interactive,
"n|no-recurse:i" => \$max_depth,
"j|jobs:i" => \$jobs,
);
test "`GIT_CONFIG="$MR_REPO"/config git config --get core.bare`" = true
svn_update = svn update "$@"
-git_update =
- if [ "$@" ]; then
- git pull "$@"
- else
- git pull
- fi
+git_update = git pull "$@"
bzr_update = bzr merge "$@"
cvs_update = cvs update "$@"
hg_update = hg pull "$@" && hg update "$@"
hg_commit = hg commit -m "$@" && hg push
darcs_commit = darcs record -a -m "$@" && darcs push -a
-git_commit = git commit -a "$@"
-bzr_commit = bzr commit "$@"
-hg_commit = hg commit -m "$@"
-darcs_commit = darcs record -a -m "$@"
+git_record = git commit -a "$@"
+bzr_record = bzr commit "$@"
+hg_record = hg commit -m "$@"
+darcs_record = darcs record -a -m "$@"
svn_diff = svn diff "$@"
git_diff = git diff "$@"
echo "Registering git url: $url in $MR_CONFIG"
mr -c "$MR_CONFIG" config "`pwd`" checkout="git clone '$url' '$MR_REPO'"
bzr_register =
- url=`cat .bzr/branch/parent`
+ url="`LC_ALL=C bzr info . | egrep -i 'checkout of branch|parent branch' | awk '{print $NF}'`"
if [ -z "$url" ]; then
error "cannot determine bzr url"
fi