Mercurial > hg
changeset 20582:02c303f64917
help: exclude deprecated extensions in the disabled part of 'help extensions'
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 27 Feb 2014 15:39:07 -0500 |
parents | 7a72c28fdc76 |
children | 18ca31bb114f |
files | mercurial/help.py tests/test-help.t |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/help.py Thu Feb 27 15:37:04 2014 -0500 +++ b/mercurial/help.py Thu Feb 27 15:39:07 2014 -0500 @@ -12,18 +12,21 @@ import encoding, util, minirst import cmdutil -def listexts(header, exts, indent=1): +def listexts(header, exts, indent=1, showdeprecated=False): '''return a text listing of the given extensions''' rst = [] if exts: rst.append('\n%s\n\n' % header) for name, desc in sorted(exts.iteritems()): + if '(DEPRECATED)' in desc and not showdeprecated: + continue rst.append('%s:%s: %s\n' % (' ' * indent, name, desc)) return rst def extshelp(): rst = loaddoc('extensions')().splitlines(True) - rst.extend(listexts(_('enabled extensions:'), extensions.enabled())) + rst.extend(listexts( + _('enabled extensions:'), extensions.enabled(), showdeprecated=True)) rst.extend(listexts(_('disabled extensions:'), extensions.disabled())) doc = ''.join(rst) return doc
--- a/tests/test-help.t Thu Feb 27 15:37:04 2014 -0500 +++ b/tests/test-help.t Thu Feb 27 15:39:07 2014 -0500 @@ -254,9 +254,7 @@ eol automatically manage newlines in repository files extdiff command to allow external programs to compare revisions factotum http authentication with factotum - fetch pull, update and merge in one command (DEPRECATED) gpg commands to sign and verify changesets - graphlog command to view revision graphs from a shell (DEPRECATED) hgcia hooks for integrating with the CIA.vc notification service hgk browse the repository in a graphical way highlight syntax highlighting for hgweb (requires Pygments)