[PATCH] chistedit: ensure a locale is set

Augie Fackler raf at durin42.com
Tue Feb 19 10:29:30 EST 2019


On Fri, Feb 15, 2019 at 02:59:37PM -0500, Jordi GutiƩrrez Hermoso wrote:
> # 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

uhhhh, if you say so

queued

>
> 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
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list