Mercurial > hg-onsub
diff test-onsub.t @ 8:ecc4fd16555d
Add --max-depth option to limit depth of recursion.
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Sun, 24 Apr 2011 11:09:36 -0400 |
parents | a2ad7553ba79 |
children | 4cb3f28590fd |
line wrap: on
line diff
--- a/test-onsub.t Sun Apr 24 10:07:03 2011 -0400 +++ b/test-onsub.t Sun Apr 24 11:09:36 2011 -0400 @@ -40,6 +40,8 @@ options: -b --breadth-first use breadth-first traversal + --max-depth N limit recursion to N levels (negative for no limit) + (default: -1) --ignore-errors continue execution despite errors -0 --print0 end subrepository names with NUL, for use with xargs @@ -105,6 +107,25 @@ a/y/s a/y/t +Limit depth of traversal: + $ hg onsub --max-depth 1 'echo $HG_SUBPATH' + a + b + $ hg onsub --max-depth 2 'echo $HG_SUBPATH' + a + a/x + a/y + b + b/u + b/v + $ hg onsub --max-depth 2 -b 'echo $HG_SUBPATH' + a + b + a/x + a/y + b/u + b/v + Test aborting: $ hg onsub -v 'test $HG_SUBPATH != "a/y/r"'