Mercurial > public > mercurial-scm > hg
diff hgext/sparse.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 | d7cecea0b254 |
children | 8eaf693b1409 |
line wrap: on
line diff
--- a/hgext/sparse.py Fri Oct 12 18:06:32 2018 +0200 +++ b/hgext/sparse.py Fri Oct 12 18:49:11 2018 +0200 @@ -122,7 +122,7 @@ propname)) def _setuplog(ui): - entry = commands.table['^log|history'] + entry = commands.table['log|history'] entry[1].append(('', 'sparse', None, "limit to changesets affecting the sparse checkout")) @@ -163,7 +163,7 @@ return orig(ui, repo, *args, **opts) def _setupclone(ui): - entry = commands.table['^clone'] + entry = commands.table['clone'] entry[1].append(('', 'enable-profile', [], 'enable a sparse profile')) entry[1].append(('', 'include', [], @@ -173,7 +173,7 @@ extensions.wrapcommand(commands.table, 'clone', _clonesparsecmd) def _setupadd(ui): - entry = commands.table['^add'] + entry = commands.table['add'] entry[1].append(('s', 'sparse', None, 'also include directories of added files in sparse config')) @@ -237,7 +237,7 @@ return orig(self, *args) extensions.wrapfunction(dirstate.dirstate, func, _wrapper) -@command('^debugsparse', [ +@command('debugsparse', [ ('I', 'include', False, _('include files in the sparse checkout')), ('X', 'exclude', False, _('exclude files in the sparse checkout')), ('d', 'delete', False, _('delete an include/exclude rule')), @@ -249,7 +249,8 @@ ('', 'refresh', False, _('updates the working after sparseness changes')), ('', 'reset', False, _('makes the repo full again')), ] + commands.templateopts, - _('[--OPTION] PATTERN...')) + _('[--OPTION] PATTERN...'), + helpbasic=True) def debugsparse(ui, repo, *pats, **opts): """make the current checkout sparse, or edit the existing checkout