From 94c5d6ef4e7fe07d83d181c5850ef5a5b58e6112 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 3 Nov 2011 14:39:20 -0400 Subject: [PATCH 1/1] better docs --- mr | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mr b/mr index d3f8efb..f1ca9f6 100755 --- a/mr +++ b/mr @@ -352,14 +352,25 @@ If the "skip" parameter is set and its command returns true, then B will skip acting on that repository. The command is passed the action name in $1. -Here are three examples. The first skips the repo unless +Here are two examples. The first skips the repo unless mr is run by joey. The second uses the hours_since function (included in mr's built-in library) to skip updating the repo unless it's -been at least 12 hours since the last update. The third skips operating -on the repo unless it already exists (use mr checkout to enable the repo). +been at least 12 hours since the last update. + [mystuff] + checkout = ... skip = test `whoami` != joey + + [linux] + checkout = ... skip = [ "$1" = update ] && ! hours_since "$1" 12 + +Another way to use skip is for a lazy checkout. This makes mr skip +operating on a repo unless it already exists. To enable the +repo, you have to explicitly check it out (using "mr -d foo checkout"). + + [foo] + checkout = ... skip = lazy =item order -- 2.39.5