--- a/mercurial/changelog.py Sun Mar 06 13:26:37 2016 -0800
+++ b/mercurial/changelog.py Sun Mar 06 14:28:46 2016 -0800
@@ -152,7 +152,7 @@
__slots__ = (
'date',
- 'description',
+ '_rawdesc',
'extra',
'files',
'manifest',
@@ -185,9 +185,10 @@
#
# changelog v0 doesn't use extra
- last = text.index("\n\n")
- self.description = encoding.tolocal(text[last + 2:])
- l = text[:last].split('\n')
+ doublenl = text.index('\n\n')
+ self._rawdesc = text[doublenl + 2:]
+
+ l = text[:doublenl].split('\n')
self.manifest = bin(l[0])
self.user = encoding.tolocal(l[1])
@@ -209,6 +210,10 @@
return self
+ @property
+ def description(self):
+ return encoding.tolocal(self._rawdesc)
+
class changelog(revlog.revlog):
def __init__(self, opener):
revlog.revlog.__init__(self, opener, "00changelog.i")