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
--- 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'
)