Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 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 | 431462bd8478 |
children | 63cfacb7917e d0225fa2f6c4 7bb1dbfd3082 |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Jul 12 07:56:43 2009 +0200 +++ b/mercurial/commands.py Fri Jul 10 13:40:25 2009 +0200 @@ -1493,7 +1493,10 @@ f = f.lstrip("^") if not ui.debugflag and f.startswith("debug"): continue - doc = gettext(e[0].__doc__) + doc = e[0].__doc__ + if doc and 'DEPRECATED' in doc and not ui.verbose: + continue + doc = gettext(doc) if not doc: doc = _("(no help text available)") h[f] = doc.splitlines(0)[0].rstrip()