Code review/Feedback needed for new extension

Martin Geisler mg at aragost.com
Fri May 7 10:33:50 CDT 2010


Christian Ebert <blacktrash at gmx.net> writes:

> * Sylvain Hamel on Friday, May 07, 2010 at 04:06:36 +0000

>> If I remove the whitespace in the docstring, then, on my Windows 7
>> PC, if I run
>> 
>> hg help macros
>> 
>> The help output is all on the same line:
>> 
>>     [macros] supermacro=log -l 5;stat purgex=revert -a;purge
>> 
>> I have to double all line breaks in the docstring to get `hg help` to
>> output the right thing.
>
> That's because the help is formatted with docutils and should
> adhere to the reStructured Text (rst) conventions.
>
> http://docutils.sourceforge.net/rst.html
>
> Probably you want to do something like this to achieve a literal
> block:
>
> Configuration example::
>
>     [alias]
>     pullupdate=hg macro pullupdate
>     [macros]
>     pullupdate=pull;update;
>
>
> Just look at some other docs in the Mercurial, compare the
> effects and steal from there ;-)

Thank you! :-)

(I recently updated the WritingExtensions page on the wiki to say that
we use reST... amazing that it's worked out mostly okay until now with
no explicit instruction!)

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list