comparison mercurial/changelog.py @ 47383:659a452ee263

revlog: use `self.sidedata` directly to construct changelogrevision We want to change `revlog._revisiondata` signature, so we need to migrate users away. Differential Revision: https://phab.mercurial-scm.org/D10781
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 27 May 2021 03:23:34 +0200
parents 2219853a1503
children 9d9eb22b9b69
comparison
equal deleted inserted replaced
47382:d6a52783d2ba 47383:659a452ee263
525 525
526 Unless you need to access all fields, consider calling 526 Unless you need to access all fields, consider calling
527 ``changelogrevision`` instead, as it is faster for partial object 527 ``changelogrevision`` instead, as it is faster for partial object
528 access. 528 access.
529 """ 529 """
530 d, s = self._revisiondata(nodeorrev) 530 d = self._revisiondata(nodeorrev)[0]
531 c = changelogrevision( 531 sidedata = self.sidedata(nodeorrev)
532 self, d, s, self._copiesstorage == b'changeset-sidedata' 532 copy_sd = self._copiesstorage == b'changeset-sidedata'
533 ) 533 c = changelogrevision(self, d, sidedata, copy_sd)
534 return (c.manifest, c.user, c.date, c.files, c.description, c.extra) 534 return (c.manifest, c.user, c.date, c.files, c.description, c.extra)
535 535
536 def changelogrevision(self, nodeorrev): 536 def changelogrevision(self, nodeorrev):
537 """Obtain a ``changelogrevision`` for a node or revision.""" 537 """Obtain a ``changelogrevision`` for a node or revision."""
538 text, sidedata = self._revisiondata(nodeorrev) 538 text = self._revisiondata(nodeorrev)[0]
539 sidedata = self.sidedata(nodeorrev)
539 return changelogrevision( 540 return changelogrevision(
540 self, text, sidedata, self._copiesstorage == b'changeset-sidedata' 541 self, text, sidedata, self._copiesstorage == b'changeset-sidedata'
541 ) 542 )
542 543
543 def readfiles(self, nodeorrev): 544 def readfiles(self, nodeorrev):