revlog: use `self.sidedata` directly to construct changelogrevision
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 27 May 2021 03:23:34 +0200
changeset 47389 659a452ee263
parent 47388 d6a52783d2ba
child 47390 fec306b05328
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
mercurial/changelog.py
--- 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'
         )