Mercurial > hg
changeset 28314:918b64c91e6c
changelog: backed out changeset 1778770e1982
We want to avoid leaking UTF-8 to main body of code wherever possible.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 02 Mar 2016 12:46:54 -0600 |
parents | aa73d6a5d9ea |
children | 9e3f505b1d50 |
files | mercurial/changelog.py mercurial/context.py |
diffstat | 2 files changed, 2 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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):