Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 40295:fa88170c10bb
help: adding a proper declaration for shortlist/basic commands (API)
We previously used the '^' prefix to indicate that a command
should be shown on the short list (shown for just "hg"), but
that's a horrible hack, so I'm removing it.
Differential Revision: https://phab.mercurial-scm.org/D5069
author | Rodrigo Damazio <rdamazio@google.com> |
---|---|
date | Fri, 12 Oct 2018 18:49:11 +0200 |
parents | 9c6473d2038b |
children | 4265bfb53dd3 3d76a8e627a6 |
comparison
equal
deleted
inserted
replaced
40294:fabbf9310025 | 40295:fa88170c10bb |
---|---|
1416 for c, e in commands.table.iteritems(): | 1416 for c, e in commands.table.iteritems(): |
1417 doc = _getdoc(e) | 1417 doc = _getdoc(e) |
1418 if 'DEPRECATED' in doc or c.startswith('debug'): | 1418 if 'DEPRECATED' in doc or c.startswith('debug'): |
1419 continue | 1419 continue |
1420 cmd = primary(c) | 1420 cmd = primary(c) |
1421 if cmd.startswith('^'): | 1421 if getattr(e[0], 'helpbasic', False): |
1422 early.append((cmd[1:], doc)) | 1422 early.append((cmd, doc)) |
1423 else: | 1423 else: |
1424 other.append((cmd, doc)) | 1424 other.append((cmd, doc)) |
1425 | 1425 |
1426 early.sort() | 1426 early.sort() |
1427 other.sort() | 1427 other.sort() |