[PATCH 1 of 2] demandimport: blacklist pythoncom

Steve Borho steve at borho.org
Sat Mar 14 22:18:44 CDT 2009


On Sat, Mar 14, 2009 at 9:43 PM, TK Soh <teekaysoh at gmail.com> wrote:
> On Sat, Mar 14, 2009 at 5:18 PM, Steve Borho <steve at borho.org> wrote:
>> On Mon, Mar 9, 2009 at 9:14 PM, Steve Borho <steve at borho.org> wrote:
>>> # HG changeset patch
>>> # User Steve Borho <steve at borho.org>
>>> # Date 1236650437 18000
>>> # Node ID 57fa116520f56e5ea21e65489586388787f7b335
>>> # Parent  55bd03e2e13c65eeb7175abfc60f9a6ef5e6f0f4
>>> demandimport: blacklist pythoncom
>>>
>>> win32com.shell would segfault at import time if pythoncom
>>> was demand loaded.
>>>
>>> diff --git a/mercurial/demandimport.py b/mercurial/demandimport.py
>>> --- a/mercurial/demandimport.py
>>> +++ b/mercurial/demandimport.py
>>> @@ -117,6 +117,7 @@
>>>     '_xmlplus',
>>>     'fcntl',
>>>     'win32com.gen_py',
>>> +    'pythoncom',
>>>     # imported by tarfile, not available under Windows
>>>     'pwd',
>>>     'grp',
>>
>>
>> Could this patch make it into 1.2.1?   TortoiseHg is using
>> demandimport internally
>> and it calls win32com.shell functions to notify the overlays when
>> files have changed.
>> There have been a few segfaults reported since we started using demandimport and
>> I believe they would be fixed by this patch.
>
> In case the patch is not accepted in time, is it possible to work
> around this in TortoiseHg by manually adding pythoncom into
> demandimport.ignore list before enabling it?

I can monkey patch it in if I have to.

--
Steve



More information about the Mercurial-devel mailing list