Mercurial > hg-onsub
changeset 14:34aa014b5989
Add help for POST-CMD
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 06 Mar 2012 14:36:55 +0100 |
parents | b10dd4461b52 |
children | 6ee895918df9 |
files | onsub.py test-onsub.t |
diffstat | 2 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/onsub.py Tue Mar 06 14:32:08 2012 +0100 +++ b/onsub.py Tue Mar 06 14:36:55 2012 +0100 @@ -18,6 +18,13 @@ each subrepository. By default, execution stops if CMD returns a non-zero exit code. Use --ignore-errors to override this. + If a POST-CMD is specified, this will be executed after all + subrepositories below the current subrepository has been visited. + This corresponds to a post-order traversal of the tree. + + It is an error to specify a POST-CMD together with the + --breadth-first flag. + Use --verbose/-v to print the command being run and the subrepo name for each run of CMD in a subrepo. Alternately, use --print0/-0 to print just the subrepo name followed by a NUL @@ -175,5 +182,5 @@ _('continue execution despite errors')), ('0', 'print0', None, _('end subrepository names with NUL, for use with xargs'))], - _('[-b] [-0] [--ignore-errors] CMD')) + _('[-b] [-0] [--ignore-errors] CMD [POST-CMD]')) }
--- a/test-onsub.t Tue Mar 06 14:32:08 2012 +0100 +++ b/test-onsub.t Tue Mar 06 14:36:55 2012 +0100 @@ -6,7 +6,7 @@ Check help formatting: $ hg help onsub - hg onsub [-b] [-0] [--ignore-errors] CMD + hg onsub [-b] [-0] [--ignore-errors] CMD [POST-CMD] execute a command in each subrepository @@ -14,6 +14,13 @@ subrepository. By default, execution stops if CMD returns a non-zero exit code. Use --ignore-errors to override this. + If a POST-CMD is specified, this will be executed after all + subrepositories below the current subrepository has been visited. This + corresponds to a post-order traversal of the tree. + + It is an error to specify a POST-CMD together with the --breadth-first + flag. + Use --verbose/-v to print the command being run and the subrepo name for each run of CMD in a subrepo. Alternately, use --print0/-0 to print just the subrepo name followed by a NUL character instead of a newline. This