Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/changelog.py @ 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 | 86de91c56355 |
children | 9e3f505b1d50 |
comparison
equal
deleted
inserted
replaced
28313:aa73d6a5d9ea | 28314:918b64c91e6c |
---|---|
332 : older versions ignore it | 332 : older versions ignore it |
333 files\n\n : files modified by the cset, no \n or \r allowed | 333 files\n\n : files modified by the cset, no \n or \r allowed |
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 (binary) | |
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 | |
345 """ | 337 """ |
346 text = self.revision(node) | 338 text = self.revision(node) |
347 if not text: | 339 if not text: |
348 return nullid, "", (0, 0), [], "", _defaultextra | 340 return nullid, "", (0, 0), [], "", _defaultextra |
349 last = text.index("\n\n") | 341 last = text.index("\n\n") |
350 desc = text[last + 2:] | 342 desc = encoding.tolocal(text[last + 2:]) |
351 l = text[:last].split('\n') | 343 l = text[:last].split('\n') |
352 manifest = bin(l[0]) | 344 manifest = bin(l[0]) |
353 user = l[1] | 345 user = l[1] |
354 | 346 |
355 tdata = l[2].split(' ', 2) | 347 tdata = l[2].split(' ', 2) |