[PATCH 02 of 10] help: use rst for version text

Erik Zielke ez at aragost.com
Thu Nov 18 08:23:42 UTC 2010


Den 17-11-2010 20:02, Matt Mackall skrev:
> On Wed, 2010-11-17 at 18:11 +0100, Erik Zielke wrote:
>> # HG changeset patch
>> # User Erik Zielke<ez at aragost.com>
>> # Date 1289291331 -3600
>> # Node ID 8b1c0f96014d2a6c955a9a92c5efd72358b48e08
>> # Parent  f81b256b8a7e02a7daae1868528120a7f1e322c1
>> help: use rst for version text
>>
>> Generate rst for version text and format that, instead of directly
>> printing the version string.
> Why is this a good thing?
>
For this patch:

The version string will then automatically be wrapped if the terminal 
width is too narrow.

For the whole series in general:

The reason I started doing this, was so there could be nice html output 
in hg serve help, generated by running docutils (or a future version of 
minirst supporting outputting to html) on the restructured text output. 
The generated restructured text should then later also be possible to be 
used by gendoc.

Unifying all help texts to minirst does also ensure automatically 
fitting all help text to terminal width. Another thing is  if minirst at 
a later point support colors, e.g. coloring options in optionlists then 
the help texts will then of course also be colored, since they will go 
through minirst.



More information about the Mercurial-devel mailing list