Patchwork [3,of,8] i18n: use unicode literal

login
register
mail settings
Submitter Pulkit Goyal
Date June 27, 2016, 1:43 p.m.
Message ID <f07fcec2e176ee59148b.1467034994@pulkit-goyal>
Download mbox | patch
Permalink /patch/15639/
State Not Applicable
Headers show

Comments

Pulkit Goyal - June 27, 2016, 1:43 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1466901653 25200
#      Sat Jun 25 17:40:53 2016 -0700
# Node ID f07fcec2e176ee59148ba781e97d06c0bd3cab9c
# Parent  c28c3406a0d33bf56d143c83b233976bbee6966a
i18n: use unicode literal

Other parts of this expression are already using unicode literals.
We need this to make Python 3 happy and to avoid an implicit
conversion in Python 2.

Patch

diff -r c28c3406a0d3 -r f07fcec2e176 mercurial/i18n.py
--- a/mercurial/i18n.py	Sat Jun 25 17:22:06 2016 -0700
+++ b/mercurial/i18n.py	Sat Jun 25 17:40:53 2016 -0700
@@ -78,7 +78,7 @@ 
             paragraphs = [p.decode("ascii") for p in message.split('\n\n')]
         # Be careful not to translate the empty string -- it holds the
         # meta data of the .po file.
-        u = u'\n\n'.join([p and _ugettext(p) or '' for p in paragraphs])
+        u = u'\n\n'.join([p and _ugettext(p) or u'' for p in paragraphs])
         try:
             # encoding.tolocal cannot be used since it will first try to
             # decode the Unicode string. Calling u.decode(enc) really