Mercurial > hg-onsub
comparison 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 |
comparison
equal
deleted
inserted
replaced
7:a2ad7553ba79 | 8:ecc4fd16555d |
---|---|
38 repository's ".hgsubstate" file. | 38 repository's ".hgsubstate" file. |
39 | 39 |
40 options: | 40 options: |
41 | 41 |
42 -b --breadth-first use breadth-first traversal | 42 -b --breadth-first use breadth-first traversal |
43 --max-depth N limit recursion to N levels (negative for no limit) | |
44 (default: -1) | |
43 --ignore-errors continue execution despite errors | 45 --ignore-errors continue execution despite errors |
44 -0 --print0 end subrepository names with NUL, for use with xargs | 46 -0 --print0 end subrepository names with NUL, for use with xargs |
45 | 47 |
46 use "hg -v help onsub" to show global options | 48 use "hg -v help onsub" to show global options |
47 | 49 |
103 b/v | 105 b/v |
104 a/y/r | 106 a/y/r |
105 a/y/s | 107 a/y/s |
106 a/y/t | 108 a/y/t |
107 | 109 |
110 Limit depth of traversal: | |
111 $ hg onsub --max-depth 1 'echo $HG_SUBPATH' | |
112 a | |
113 b | |
114 $ hg onsub --max-depth 2 'echo $HG_SUBPATH' | |
115 a | |
116 a/x | |
117 a/y | |
118 b | |
119 b/u | |
120 b/v | |
121 $ hg onsub --max-depth 2 -b 'echo $HG_SUBPATH' | |
122 a | |
123 b | |
124 a/x | |
125 a/y | |
126 b/u | |
127 b/v | |
128 | |
108 Test aborting: | 129 Test aborting: |
109 | 130 |
110 $ hg onsub -v 'test $HG_SUBPATH != "a/y/r"' | 131 $ hg onsub -v 'test $HG_SUBPATH != "a/y/r"' |
111 executing 'test $HG_SUBPATH != "a/y/r"' in a | 132 executing 'test $HG_SUBPATH != "a/y/r"' in a |
112 executing 'test $HG_SUBPATH != "a/y/r"' in a/x | 133 executing 'test $HG_SUBPATH != "a/y/r"' in a/x |