# HG changeset patch
# User Jordi Gutiérrez Hermoso <[hidden email]>
# Date 1550260567 18000
# Fri Feb 15 14:56:07 2019 -0500
# Node ID 611f94479e62c720f7f90f3a58137e97aa600fcb
# Parent a22321f2b1ee18ea09a70fee9e524d2f0298aaaa
chistedit: ensure a locale is set
My paternal surname was showing incorrectly without this fix.
diff --git a/hgext/histedit.py b/hgext/histedit.py
@@ -948,6 +948,12 @@ def findoutgoing(ui, repo, remote=None,
# Curses Support
+ # Curses requires setting the locale or it will default to the C
+ # locale. This sets the locale to the user's default system
+ # locale.
+ import locale
+ locale.setlocale(locale.LC_ALL, u'')
curses = None
> On Feb 19, 2019, at 10:33, Jordi Gutiérrez Hermoso <[hidden email]> wrote:
> On Tue, 2019-02-19 at 10:29 -0500, Augie Fackler wrote:
>> On Fri, Feb 15, 2019 at 02:59:37PM -0500, Jordi Gutiérrez Hermoso wrote:
>>> # HG changeset patch
>>> # User Jordi Gutiérrez Hermoso <[hidden email]>
>>> # Date 1550260567 18000
>>> # Fri Feb 15 14:56:07 2019 -0500
>>> # Node ID 611f94479e62c720f7f90f3a58137e97aa600fcb
>>> # Parent a22321f2b1ee18ea09a70fee9e524d2f0298aaaa
>>> chistedit: ensure a locale is set
>> uhhhh, if you say so
> If it's any reassurance, crecord does this too, and you haven't seen
> weirndess when picking hunks, have you?
On Tue, 19 Feb 2019 23:16:03 -0500, Jordi Gutiérrez Hermoso wrote:
> On Wed, 2019-02-20 at 11:22 +0900, Yuya Nishihara wrote:
> > Perhaps, we shouldn't do setlocale() until curses is actually used.
> Hm, that's a good point. Move it to _chisteditmain? That's the entry
> point, I think.
> Or maybe we should make our own wrapper curses module so it can be
> demandimported and use that from both chistedit and crecord?