changelog: backed out changeset
1778770e1982
We want to avoid leaking UTF-8 to main body of code wherever possible.
--- a/mercurial/changelog.py Fri Jan 01 22:16:25 2016 +0900
+++ b/mercurial/changelog.py Wed Mar 02 12:46:54 2016 -0600
@@ -334,20 +334,12 @@
(.*) : comment (free text, ideally utf-8)
changelog v0 doesn't use extra
-
- Returns a 6-tuple consisting of the following:
- - manifest node (binary)
- - user (binary)
- - (time, timezone) 2-tuple of a float and int offset
- - list of files modified by the cset
- - commit message / description (binary)
- - dict of extra entries
"""
text = self.revision(node)
if not text:
return nullid, "", (0, 0), [], "", _defaultextra
last = text.index("\n\n")
- desc = text[last + 2:]
+ desc = encoding.tolocal(text[last + 2:])
l = text[:last].split('\n')
manifest = bin(l[0])
user = l[1]
--- a/mercurial/context.py Fri Jan 01 22:16:25 2016 +0900
+++ b/mercurial/context.py Wed Mar 02 12:46:54 2016 -0600
@@ -554,7 +554,7 @@
def files(self):
return self._changeset[3]
def description(self):
- return encoding.tolocal(self._changeset[4])
+ return self._changeset[4]
def branch(self):
return encoding.tolocal(self._changeset[5].get("branch"))
def closesbranch(self):