##// END OF EJS Templates
changelog: lazy decode description (API)...
Gregory Szorc -
r28306:1778770e default
parent child Browse files
Show More
@@ -334,12 +334,20 b' class changelog(revlog.revlog):'
334 (.*) : comment (free text, ideally utf-8)
334 (.*) : comment (free text, ideally utf-8)
335
335
336 changelog v0 doesn't use extra
336 changelog v0 doesn't use extra
337
338 Returns a 6-tuple consisting of the following:
339 - manifest node (binary)
340 - user (encoding.localstr)
341 - (time, timezone) 2-tuple of a float and int offset
342 - list of files modified by the cset
343 - commit message / description (binary)
344 - dict of extra entries
337 """
345 """
338 text = self.revision(node)
346 text = self.revision(node)
339 if not text:
347 if not text:
340 return nullid, "", (0, 0), [], "", _defaultextra
348 return nullid, "", (0, 0), [], "", _defaultextra
341 last = text.index("\n\n")
349 last = text.index("\n\n")
342 desc = encoding.tolocal(text[last + 2:])
350 desc = text[last + 2:]
343 l = text[:last].split('\n')
351 l = text[:last].split('\n')
344 manifest = bin(l[0])
352 manifest = bin(l[0])
345 user = encoding.tolocal(l[1])
353 user = encoding.tolocal(l[1])
@@ -554,7 +554,7 b' class changectx(basectx):'
554 def files(self):
554 def files(self):
555 return self._changeset[3]
555 return self._changeset[3]
556 def description(self):
556 def description(self):
557 return self._changeset[4]
557 return encoding.tolocal(self._changeset[4])
558 def branch(self):
558 def branch(self):
559 return encoding.tolocal(self._changeset[5].get("branch"))
559 return encoding.tolocal(self._changeset[5].get("branch"))
560 def closesbranch(self):
560 def closesbranch(self):
General Comments 0
You need to be logged in to leave comments. Login now