Bug 2799 - Flags to let 'hg help foo' access
Summary: Flags to let 'hg help foo' access
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 17:38 UTC by David Jade
Modified: 2012-05-13 04:56 UTC (History)
0 users

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Jade 2011-05-06 17:38 UTC
I have an existing extension called "subrepo". Recently I upgraded from 1.5.4 
to 1.8.x and now when I execute 'hg help subrepo' I get the built-in help 
topic for 'subrepos' instead of my extension's help text.  If I execute 'hg 
subrepo', my extension executes correctly but since it requires arguments, it 
tries to display its help and instead shows the built-in 'subrepos' text in 
this case as well.

The extension itself work fine, I just can't get the help text.

The extension is located here: https://bitbucket.org/davidjade/hgsubrepo
Comment 1 Martin Geisler 2011-05-09 02:20 UTC
We have a similar problem when an extension defines a command with the same
name as the extension itself: 'hg help foo' shows the help for the foo
command and not the foo extension.

We need some flags to 'hg help' so that the user can select the right kind
of help in case they shadow each other. We could then display

  Use 'hg help --extension subrepo' to see help for the subrepo extension
  Use 'hg help --command subrepo' to see help for the subrepo command

at the end of the help topic when we detect that it overshadows an extension
and/or a command with the same name.

Since most extensions have moved their main help text into the command
docstrings, we should only advertise 'hg help --extension' if the extension
docstring is more than a single line (all extensions should have at least a
single line docstring since it's used used in 'hg help extensions').
Comment 2 HG Bot 2011-05-10 16:00 UTC
Fixed by http://selenic.com/repo/hg/rev/005a540e9aee
Martin Geisler <mg@aragost.com>
help: add -c/--command flag to only show command help (issue2799)

(please test the fix)
Comment 3 Bugzilla 2012-05-12 09:19 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:19 EDT  ---

This bug was previously known as _bug_ 2799 at http://mercurial.selenic.com/bts/issue2799