[PATCH 0 of 2 STABLE] Consistent help text formatting with minirst

Martin Geisler mg at aragost.com
Tue Jan 10 09:43:00 CST 2012

Olav Reinert <seroton10 at gmail.com> writes:

> On 10. jan 2012, at 01.37, Matt Mackall wrote:
>> On Mon, 2012-01-09 at 17:31 +0100, Olav Reinert wrote:
>>> The output from "hg help" is formatted inconsistently, sometimes using
>>> formatting strings, sometimes using minirst. Also, the list of enabled
>>> extensions is indented differently than the other two sections.
>> What user-visible bug does this fix?
> "hg help" produces three sections of output: commands, extensions, and
> additional (help topics).
> Currently, the "commands" and "additional" sections are always
> aligned, on both columns, because formatting is done using the %
> string formatting operator, or direct invocation of util.wrap(). In
> contrast, the "extensions" section is formatted as an RST field list.
> Because our minirst implementation shrinks the width of the left
> column of field lists to fit its content, the right column is easily
> brought out of alignment with the columns above and below. This effect
> is pronounced in the case where mq is the only enabled extension, and
> it looks buggy to me.

Yay, you just wrote a nice commit message there! :-)

I would even say you should extend it with an example of the output with
only mq enabled:

  $ HGRCPATH= hg help --config extensions.mq=
   verify       verify the integrity of the repository
   version      output version and copyright information

  enabled extensions:

   mq  manage a stack of patches

  additional help topics:

   config       Configuration Files
   dates        Date Formats

Martin Geisler

aragost Trifork
Professional Mercurial support

More information about the Mercurial-devel mailing list