]> 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 log command
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 11 Oct 2007 18:27:25 +0000 (14:27 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 11 Oct 2007 18:27:25 +0000 (14:27 -0400)
mr

diff --git a/mr b/mr
index 7c4ff30b56dcc36f19339773e464d430ea3b830a..fd0ba15748c8f9e82442368a5d19e583ac84e5be 100755 (executable)
--- a/mr
+++ b/mr
@@ -16,6 +16,8 @@ B<mr> [options] commit [-m "message"]
 
 B<mr> [options] diff
 
 
 B<mr> [options] diff
 
+B<mr> [options] log
+
 B<mr> [options] action [params ...]
 
 =head1 DESCRIPTION
 B<mr> [options] action [params ...]
 
 =head1 DESCRIPTION
@@ -64,6 +66,10 @@ The optional -m parameter allows specifying a commit message.
 
 Show a diff of uncommitted changes.
 
 
 Show a diff of uncommitted changes.
 
+=item log
+
+Show the commit log.
+
 =item list
 
 List the repositories that mr will act on.
 =item list
 
 List the repositories that mr will act on.
@@ -219,8 +225,13 @@ if (! exists $knownactions{$action}) {
                if (@matches == 1) {
                        $action=$matches[0];
                }
                if (@matches == 1) {
                        $action=$matches[0];
                }
+               elsif (@matches == 0) {
+                       die "mr: unknown action \"$action\" (known actions: ".
+                               join(", ", sort keys %knownactions).")\n";
+               }
                else {
                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
        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 \
 list = true
 help = \
        if [ ! -e "$MR_PATH" ]; then \