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

Olav Reinert seroton10 at gmail.com
Sat Jun 30 16:20:45 CDT 2012


On 30. jun. 2012, at 23.13, Sune Foldager wrote:

> 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.

Yes. The reason I did it anyway is that I somehow got the impression that Matt dislikes changes combined with moving large blocks of code around. But perhaps fixing only namespace-related issues is OK in such cases?


More information about the Mercurial-devel mailing list