B<mr> [options] diff
+B<mr> [options] log
+
B<mr> [options] action [params ...]
=head1 DESCRIPTION
Show a diff of uncommitted changes.
-=item list
+=item log
+
+Show the commit log.
+
+=item list (or ls)
List the repositories that mr will act on.
=item -c mrconfig
-Use the specified mrconfig file, instead of looking for on in your home
+Use the specified mrconfig file, instead of looking for one in your home
directory.
=item -v
will try to load a .mrconfig file from the root of the repository. (You
should avoid chaining from repositories with untrusted committers.) The
"lib" parameter can specify some shell code that will be run before each
-command, this can be a useful way to define shell functions other commands
-can use.
+command, this can be a useful way to define shell functions for other commands
+to use.
The "default" section allows setting up default handlers for each action,
and is overridden by the contents of other sections. mr contains default
handlers for the "update", "status", and "commit" actions, so normally
you only need to specify what to do for "checkout".
-The "alias" section allows adding aliases for commands. Each parameter
-is an alias, and its value is the command to run.
+The "alias" section allows adding aliases for actions. Each parameter
+is an alias, and its value is the action to use.
For example:
if (@matches == 1) {
$action=$matches[0];
}
+ elsif (@matches == 0) {
+ die "mr: unknown action \"$action\" (known actions: ".
+ join(", ", sort keys %knownactions).")\n";
+ }
else {
- die "mr: ambiguous action \"$action\" (matches @matches)\n";
+ die "mr: ambiguous action \"$action\" (matches: ".
+ join(", ", @matches).")\n";
}
}
}
push @skipped, $dir;
}
else {
- print "mr $action: $dir\n";
+ if (! $nochdir) {
+ print "mr $action: $dir\n";
+ }
+ else {
+ print "mr $action: $dir (in subdir $directory)\n";
+ }
my $command="set -e; ".$lib.
"my_action(){ $config{$topdir}{$subdir}{$action} ; }; my_action ".
join(" ", map { s/\//\/\//g; s/"/\"/g; '"'.$_.'"' } @ARGV);
[alias]
co = checkout
ci = commit
+ ls = list
[default]
lib = \
error() { \
else \
error "unknown repo type"; \
fi
+log = \
+ if [ -d "$MR_REPO"/.svn ]; then \
+ svn log"$@"; \
+ elif [ -d "$MR_REPO"/.git ]; then \
+ git log "$@"; \
+ else \
+ error "unknown repo type"; \
+ fi
list = true
help = \
if [ ! -e "$MR_PATH" ]; then \