Extension to list up disabled extensions correctly on frozen exe

Yuya Nishihara yuya at tcha.org
Mon May 9 10:01:40 CDT 2011


Steve Borho wrote:
> On Sun, May 8, 2011 at 11:09 AM, Matt Mackall <mpm at selenic.com> wrote:
> > On Mon, 2011-05-09 at 00:34 +0900, Yuya Nishihara wrote:
> >> Hi,
> >>
> >> Currently extensions.disabled() does not work on frozen exe, so I made
> >> a little extension to work around this problem:
> >>
> >> http://mercurial.selenic.com/wiki/FixfrozenextsExtension
> >>
> >> Because TortoiseHg relys on this function, we ships it since 1.1 (released
> >> on July 1, 2011) and enables by default.
> >> We discussed yesterday to include it in TortoiseHg tree, but thought
> >> innapropriate because it's useful on another Windows package.
> >>
> >> So, is it possible to include this extension in Mercurial tree?
> >> or integrate some bits into core extensions.py module?
> >>
> >> It uses pre-built index of extensions if available; otherwise falls back to
> >> read 'library.zip'. The index is generated by thg-winbuild:
> >>
> >> https://bitbucket.org/tortoisehg/thg-winbuild/src/5a54a1cc1a30/setup.py#cl-241
> >
> > Yes, we should probably figure out how to start merging some of this.
> 
> Perhaps Mercurial's setup.py could generate the extension list file
> when it detects a py2exe target.  Then both the MSI and InnoSetup
> installers would benefit from fixfrozenexts.

I think the code to handle extension list can be merged into extensions.py
module. It'll be small and testable. So I propose,

- generate the extension list by setup.py if required
- change extensions.py to use extension list if available

It never include messy code to read/cache 'library.zip'.

Regards,
Yuya


More information about the Mercurial-devel mailing list