Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
9127:35c3f94233a0 | 9128:98d90ad54749 |
---|---|
1491 if name == "shortlist" and not f.startswith("^"): | 1491 if name == "shortlist" and not f.startswith("^"): |
1492 continue | 1492 continue |
1493 f = f.lstrip("^") | 1493 f = f.lstrip("^") |
1494 if not ui.debugflag and f.startswith("debug"): | 1494 if not ui.debugflag and f.startswith("debug"): |
1495 continue | 1495 continue |
1496 doc = gettext(e[0].__doc__) | 1496 doc = e[0].__doc__ |
1497 if doc and 'DEPRECATED' in doc and not ui.verbose: | |
1498 continue | |
1499 doc = gettext(doc) | |
1497 if not doc: | 1500 if not doc: |
1498 doc = _("(no help text available)") | 1501 doc = _("(no help text available)") |
1499 h[f] = doc.splitlines(0)[0].rstrip() | 1502 h[f] = doc.splitlines(0)[0].rstrip() |
1500 cmds[f] = c.lstrip("^") | 1503 cmds[f] = c.lstrip("^") |
1501 | 1504 |