Of chickens, eggs, and shadows thereof
Dan Villiom Podlaski Christiansen
danchr at gmail.com
Fri Jun 19 17:15:16 CDT 2009
On 19/06/2009, at 22.41, Cedric Duval wrote:
> Cedric Duval wrote:
>> Here is a proof of concept for a listing of all available (and
>> loadable)
>> extensions. Comments on the approach and the code much welcome.
>
> To sum up the received feedback: loading that way may run code, so at
> least should be ensured that things shipped in hgext/ are sane. So
> this
> is not material for 1.3, but rather an idea to be re-visited later.
>
> I'll try to address the rest (shadowed help).
I just tried writing a small script that uses the ‘pydoc’ module to
read summaries from the modules, without loading them. To my surprise,
it worked :) I had to change all the extensions to start delimit their
docstrings with """ rather than ''', though. But still, it works!
I've attached it below in the form of a patch against Mercurial. The
patch changes docstrings and adds the script, but that's about it.
--
Dan Villiom Podlaski Christiansen
danchr at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extension-listing.diff
Type: application/octet-stream
Size: 22264 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090620/376eb19b/attachment.obj
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1943 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090620/376eb19b/attachment.bin
More information about the Mercurial-devel
mailing list