Patchwork D10781: revlog: use `self.sidedata` directly to construct changelogrevision

login
register
mail settings
Submitter phabricator
Date May 28, 2021, 10:56 p.m.
Message ID <differential-rev-PHID-DREV-kvm6l3fjvbplietosywi-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49099/
State Superseded
Headers show

Comments

phabricator - May 28, 2021, 10:56 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We want to change `revlog._revisiondata` signature, so we need to migrate users
  away.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10781

AFFECTED FILES
  mercurial/changelog.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -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'
         )