[PATCH 2 of 3] help: modify config.txt to make minirst find sections correctly (issue2804)
yun lee
yun.lee.bj at gmail.com
Mon May 30 09:08:39 CDT 2011
2011/5/30 Martin Geisler <mg at lazybytes.net>:
> yun lee <yun.lee.bj at gmail.com> writes:
>
>> It's necessary to make the change in this patch to make minirst find
>> sections correctly .
>
> I've pushed this patch but applied it to doc/config.txt.
>
> I made the commit message a little bigger by including the paragraph you
> wrote above so that it now describes *why* this change is needed. Please
> don't send such explanations as additional emails -- include them in the
> commit message instead :-)
>
> I removed the reference to Issue2804 since this is just a step on the
> way and not really a fix for that issue.
I've seen the commit, thanks for your valuable advice, Martin.
>
>> diff -r be66dc433d4b mercurial/minirst.py
>> --- a/mercurial/minirst.py Sat May 28 12:39:26 2011 +0800
>> +++ b/mercurial/minirst.py Sat May 28 19:48:04 2011 +0800
>> @@ -442,6 +442,13 @@
>> blocks = findliteralblocks(blocks)
>> blocks, pruned = prunecontainers(blocks, keep or [])
>> blocks = findsections(blocks)
>> +
>> + f = open('blocks.txt', 'w')
>> + content = '\n'.join(str(b) for b in blocks)
>> +
>> + f.write(content)
>> + f.close()
>> +
>> blocks = inlineliterals(blocks)
>> blocks = hgrole(blocks)
>> blocks = splitparagraphs(blocks)
>
> If you look 30 lines further below in minirst.py, then you'll see that
> it can be run as a script on the command line and that it will then
> print lots of debug information, including the exact block structure.
I see it, thanks for your patch on this function.
> --
> Martin Geisler
>
> Mercurial links: http://mercurial.ch/
>
--
Yun Lee
More information about the Mercurial-devel
mailing list