# HG changeset patch # User Matt Mackall # Date 1456944414 21600 # Node ID 918b64c91e6cdca2b0af626bcc7cc865cdc17d64 # Parent aa73d6a5d9ea60d2c82ad9c53fc562614aa982f9 changelog: backed out changeset 1778770e1982 We want to avoid leaking UTF-8 to main body of code wherever possible. diff -r aa73d6a5d9ea -r 918b64c91e6c mercurial/changelog.py --- 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] diff -r aa73d6a5d9ea -r 918b64c91e6c mercurial/context.py --- 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):