[PATCH] chistedit: ensure a locale is set
Jordi Gutiérrez Hermoso
jordigh at octave.org
Fri Feb 15 19:59:37 UTC 2019
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh at octave.org>
# 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
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -948,6 +948,12 @@ def findoutgoing(ui, repo, remote=None,
# Curses Support
try:
import curses
+
+ # 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'')
except ImportError:
curses = None
More information about the Mercurial-devel
mailing list