From 281d81db1a7cc4e9da9b257603e69ab0ddd80dc4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Oct 2007 14:27:25 -0400 Subject: [PATCH] add log command --- mr | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/mr b/mr index 7c4ff30..fd0ba15 100755 --- a/mr +++ b/mr @@ -16,6 +16,8 @@ B [options] commit [-m "message"] B [options] diff +B [options] log + B [options] action [params ...] =head1 DESCRIPTION @@ -64,6 +66,10 @@ The optional -m parameter allows specifying a commit message. Show a diff of uncommitted changes. +=item log + +Show the commit log. + =item list List the repositories that mr will act on. @@ -219,8 +225,13 @@ if (! exists $knownactions{$action}) { 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"; } } } @@ -488,6 +499,14 @@ diff = \ 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 \ -- 2.39.2