[PATCH 1 of 4] extensions: obtain docs by importing modules instead of parsing them
Martin Geisler
mg at lazybytes.net
Fri Jul 31 09:37:53 UTC 2009
Dan Villiom Podlaski Christiansen <danchr at gmail.com> writes:
> On 31/07/2009, at 08.06, Cédric Duval wrote:
>
>> # HG changeset patch
>> # User Cédric Duval <cedricduval at free.fr>
>> # Date 1248811268 -7200
>> # Node ID be5a81430dd6903ac1497315cc49e0456d568a12
>> # Parent 25255ce87bcfb753df078b2f8cabc6bcb5cb96ce
>> extensions: obtain docs by importing modules instead of parsing them
>
> Are you certain that this is safe? I wrote up a small sed script to
> remove documentation, and from what I can tell some of the extensions
> actually modify Mercurial at load. Third party extensions are likely
> to do it too; so far, extension authors have been able to rely on
> their modules not being loaded unless the exception itself is loaded
> and enabled.
The idea is, that this should be equivalent to simply enabling all
extensions. When you ask for help about an enabled extension, we already
simply return mod.__doc__.
We won't load random third-party extensions, it is only extensions from
hgext that are loaded temporarily by the disabled() function in order to
generate 'hg help extensions'.
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
More information about the Mercurial-devel
mailing list