changeset 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 d6a52783d2ba
children fec306b05328
files mercurial/changelog.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changelog.py	Thu May 27 03:21:53 2021 +0200
+++ b/mercurial/changelog.py	Thu May 27 03:23:34 2021 +0200
@@ -527,15 +527,16 @@
         ``changelogrevision`` instead, as it is faster for partial object
         access.
         """
-        d, s = self._revisiondata(nodeorrev)
-        c = changelogrevision(
-            self, d, s, self._copiesstorage == b'changeset-sidedata'
-        )
+        d = self._revisiondata(nodeorrev)[0]
+        sidedata = self.sidedata(nodeorrev)
+        copy_sd = self._copiesstorage == b'changeset-sidedata'
+        c = changelogrevision(self, d, sidedata, copy_sd)
         return (c.manifest, c.user, c.date, c.files, c.description, c.extra)
 
     def changelogrevision(self, nodeorrev):
         """Obtain a ``changelogrevision`` for a node or revision."""
-        text, sidedata = self._revisiondata(nodeorrev)
+        text = self._revisiondata(nodeorrev)[0]
+        sidedata = self.sidedata(nodeorrev)
         return changelogrevision(
             self, text, sidedata, self._copiesstorage == b'changeset-sidedata'
         )