[PATCH 1 of 2] help: extract help text generation into a separate function

Sune Foldager cryo at cyanite.org
Sat Jun 30 16:13:16 CDT 2012


On 2012-06-26 23:23, Olav Reinert wrote:
># HG changeset patch
># User Olav Reinert <seroton10 at gmail.com>
># Date 1340745489 -7200
># Node ID 77d124b770d077179d3e55c48eadc141d2fc7740
># Parent  cd7db8e05c657fb08b51903fa2ef8c2246de1c4b
>help: extract help text generation into a separate function
>
>The help command is refactored so that all generation of RST help text is
>encapsulated in a separate function (called 'helprst'). Because the intention
>is to move helprst into help.py, a number of small changes (which make no
>semantic difference) are made in preparation for the move. In this way, the
>move itself is a pure cut-and-paste of a large text block, without any other
>changes.

[...]

>+from mercurial.help import *

For what it's worth, I'd prefer not doing this, as it can be problematic and
is not considered good style, and instead just fixing a few more things up
after the code is moved.

Otherwise they look good to me.

-Sune


More information about the Mercurial-devel mailing list