[PATCH] help: 'hg help' supports subtopics (issue2804)

yun lee yun.lee.bj at gmail.com
Mon May 16 08:56:05 CDT 2011


2011/5/14 Martin Geisler <mg at lazybytes.net>:
> Yes, the idea is that we can have as much documentation as we want for
> each configuration value.
>
> But let us backtrack a little: let us start by making
>
>  $ hg help alias
>
> show what you see on
>
>  http://www.selenic.com/mercurial/hgrc.5.html#alias
>
> In other words, let us take the parts of your patch that adds the
> sub-topic functionality. That will be patch nr 1.

Yes, Martin. I would love to, but I still feel puzzled. For  patch nr1,
1.) Use "##" format?
2.) Put the concrete description in *.txt?


>
> A second patch can then move the [alias] section from doc/hgrc.5.txt to
> doc/mercurial/help/alias.txt, a third patch can move [auth], etc.
>
> Some of the sections (e.g., [diff]) overlap with names of existing
> commands -- what can we do with those? You suggested that we put things
> into a config "namespace" so that one must use
>
>  hg help config.diff
>
> to get the help for the [diff] section. I would prefer if we in the next
> step could write just
>
>  hg help diff.git
>
> and not
>
>  hg help config.diff.git
>
> since we've tried to teach ourselves and users to talk about config
> settings as "section.name", not "config.section.name". So we could add a
> flag to 'hg help', just like it now has flags to show the module help
> string when a command exist with the same name as an extension.
Could you give an example for it, please?
> I cannot
> come up with a good name for such a flag, any ideas?
>
> So let's start by getting a patch nr 1 that just adds the subtopic
> functionality.
>
> --
> Martin Geisler
>
> Mercurial links: http://mercurial.ch/
>



-- 
Yun Lee


More information about the Mercurial-devel mailing list