[PATCH] crecord: fix statup crash of curses UI

Laurent Charignon lcharignon at fb.com
Wed Mar 18 15:04:46 CDT 2015


Cool, I tested and sent a V2 for this one.

Thanks,

Laurent

On 3/18/15, 11:36 AM, "Matt Mackall" <mpm at selenic.com> wrote:

>On Wed, 2015-03-18 at 10:47 -0700, Laurent Charignon wrote:
>> # HG changeset patch
>> # User Laurent Charignon <lcharignon at fb.com>
>> # Date 1426700642 25200
>> #      Wed Mar 18 10:44:02 2015 -0700
>> # Node ID e236783e45df422cee4ec7f9732d35100b05fb0d
>> # Parent  365b6d3e8e5046ab0e538686dd8cf25f73efa039
>> crecord: fix statup crash of curses UI
>> 
>> Introduced by 7d5f935bd705, not caught by the tests as they don't cover
>>the UI
>> code
>> 
>> diff --git a/mercurial/crecord.py b/mercurial/crecord.py
>> --- a/mercurial/crecord.py
>> +++ b/mercurial/crecord.py
>> @@ -872,7 +872,7 @@
>>          width = self.xscreensize
>>          # turn tabs into spaces
>>          instr = instr.expandtabs(4)
>> -        strwidth = encoding.ucolwidth(instr)
>> +        strwidth = encoding.ucolwidth(unicode(instr))
>
>Actually, the fix is to simply drop the u from ucolwidth, my bad. Please
>avoid using unicode() wherever possible.
>
>-- 
>Mathematics is the supreme nostalgia of our time.
>
>



More information about the Mercurial-devel mailing list