Mercurial > public > mercurial-scm > hg
comparison hgext/githelp.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 | c303d65d2e34 |
children | 876494fd967d |
comparison
equal
deleted
inserted
replaced
40294:fabbf9310025 | 40295:fa88170c10bb |
---|---|
48 s = s.replace('HEAD', '.') | 48 s = s.replace('HEAD', '.') |
49 # HEAD~ in git is .~1 in mercurial | 49 # HEAD~ in git is .~1 in mercurial |
50 s = re.sub('~$', '~1', s) | 50 s = re.sub('~$', '~1', s) |
51 return s | 51 return s |
52 | 52 |
53 @command('^githelp|git', [ | 53 @command('githelp|git', [ |
54 ], _('hg githelp'), | 54 ], _('hg githelp'), |
55 helpcategory=command.CATEGORY_HELP) | 55 helpcategory=command.CATEGORY_HELP, helpbasic=True) |
56 def githelp(ui, repo, *args, **kwargs): | 56 def githelp(ui, repo, *args, **kwargs): |
57 '''suggests the Mercurial equivalent of the given git command | 57 '''suggests the Mercurial equivalent of the given git command |
58 | 58 |
59 Usage: hg githelp -- <git command> | 59 Usage: hg githelp -- <git command> |
60 ''' | 60 ''' |