X-Git-Url: https://git.madduck.net/code/myrepos.git/blobdiff_plain/4e609667a9b2545726b8076da2f4504fa0d9c9b1..281d81db1a7cc4e9da9b257603e69ab0ddd80dc4:/mr diff --git a/mr b/mr index 3c998f3..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 @@ -28,6 +30,11 @@ respository. Any mix of revision control systems can be used with B, and you can define arbitrary actions for commands like "update", "checkout", or "commit". +B cds into and operates on all registered repsitories at or below your +working directory. Or, if you are in a subdirectory of a repository that +contains no other registered repositories, it will stay in that directory, +and work on only that repository, + The predefined commands should be fairly familiar to users of any revision control system: @@ -59,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. @@ -70,11 +81,8 @@ Displays this help. =back Actions can be abbreviated to any unambiguous subsctring, so -"mr st" is equivilant to "mr status". - -B operates on all registered repsitories at or below your working -directory. Or, if you are in a subdirectory of a repository that contains -no other registered repositories, it will act on only that repository. +"mr st" is equivilant to "mr status", and "mr up" is equivilant to "mr +update" Additional parameters can be passed to other commands than "commit", they will be passed on unchanged to the underlying revision control system. @@ -217,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"; } } } @@ -486,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 \