[PATCH 1 of 2] demandimport: blacklist pythoncom

TK Soh teekaysoh at gmail.com
Sat Mar 14 22:41:18 CDT 2009


On Sun, Mar 15, 2009 at 3:18 AM, Steve Borho <steve at borho.org> wrote:
> 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.

Sorry I am not familiar with the term "monkey patch". Do you mean
patching mercurial core?



More information about the Mercurial-devel mailing list