Patchwork D6052: global: use raw string for setlocale() argument

login
register
mail settings
Submitter phabricator
Date March 3, 2019, 9:34 a.m.
Message ID <c86dec3ac96e3824249a7b578d3f3675@localhost.localdomain>
Download mbox | patch
Permalink /patch/39020/
State Not Applicable
Headers show

Comments

phabricator - March 3, 2019, 9:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG82d9728ace95: global: use raw string for setlocale() argument (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6052?vs=14301&id=14317

REVISION DETAIL
  https://phab.mercurial-scm.org/D6052

AFFECTED FILES
  hgext/histedit.py
  mercurial/crecord.py

CHANGE DETAILS




To: indygreg, durin42, #hg-reviewers
Cc: yuja, mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -30,7 +30,7 @@ 
 
 # This is required for ncurses to display non-ASCII characters in default user
 # locale encoding correctly.  --immerrr
-locale.setlocale(locale.LC_ALL, u'')
+locale.setlocale(locale.LC_ALL, r'')
 
 # patch comments based on the git one
 diffhelptext = _("""# To remove '-' lines, make them ' ' lines (context).
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -953,7 +953,7 @@ 
     # locale. This sets the locale to the user's default system
     # locale.
     import locale
-    locale.setlocale(locale.LC_ALL, u'')
+    locale.setlocale(locale.LC_ALL, r'')
 except ImportError:
     curses = None