[PATCH] color.py: clear _terminfo_params in win32 mode

Andrei Vermel andrei.vermel at gmail.com
Fri Jul 29 10:29:24 CDT 2011


On 29-Jul-11 6:48 PM, Matt Mackall wrote:
> On Fri, 2011-07-29 at 15:48 +0400, Andrei Vermel wrote:
>> # HG changeset patch
>> # Date 1311939387 -14400
>> # User Andrei Vermel<avermel at mail.ru>
>> # Parent b26bc60b536646a7c83934fab88749641faed230
>> color.py: clear _terminfo_params in win32 mode
> What is this for?

I happen to have a python module curses installed. This prevents color 
from calling it in win32 mode and crashing. There's a similar thing 
already done a few lines below for 'ansi' mode for the same purpose.

Andrei


>> diff --git a/hgext/color.py b/hgext/color.py
>> --- a/hgext/color.py
>> +++ b/hgext/color.py
>> @@ -180,6 +180,7 @@
>>                realmode = 'ansi'
>>
>>        if realmode == 'win32':
>> +        _terminfo_params = {}
>>            if not w32effects:
>>                if mode == 'win32':
>>                    # only warn if color.mode is explicitly set to win32
>>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list