Mercurial > public > mercurial-scm > hg
diff tests/test-extension @ 9128:98d90ad54749
commands: hide deprecated commands.
A command is considered deprecated if the word "DEPRECATED" is found
in the doc string. Such commands are hidden from non-verbose help.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Fri, 10 Jul 2009 13:40:25 +0200 |
parents | d2899a856f9f |
children | 1c83938b6a8e |
line wrap: on
line diff
--- a/tests/test-extension Sun Jul 12 07:56:43 2009 +0200 +++ b/tests/test-extension Fri Jul 10 13:40:25 2009 +0200 @@ -73,11 +73,25 @@ "yet another debug command" pass -cmdtable = {"debugfoobar": (debugfoobar, (), "hg debugfoobar")} +def foo(ui, repo, *args, **opts): + """yet another foo command + + This command has been DEPRECATED since forever. + """ + pass + +cmdtable = { + "debugfoobar": (debugfoobar, (), "hg debugfoobar"), + "foo": (foo, (), "hg foo") +} EOF debugpath=`pwd`/debugextension.py echo "debugextension = $debugpath" >> $HGRCPATH +echo "% hg help" hg help debugextension +echo "% hg help --verbose" +hg --verbose help debugextension +echo "% hg help --debug" hg --debug help debugextension echo 'debugextension = !' >> $HGRCPATH