diff mercurial/revlog.py @ 50634:32837c7e2e4b

revlog: add a `get_revlog` method This might seen weird, but I actually thing we have been needing this for a long time. There is multiple object that kind of pretend being revlogs while actually wrapping the actual revlog. Since multiple code needs to access the actuel revlog. See documentation for more details. Expect cleanup of various places one the current series is done.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 28 May 2023 05:23:46 +0200
parents 5ae124310ab0
children 9caa860dcbec
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon May 29 04:26:39 2023 +0200
+++ b/mercurial/revlog.py	Sun May 28 05:23:46 2023 +0200
@@ -663,6 +663,10 @@
         # revlog header -> revlog compressor
         self._decompressors = {}
 
+    def get_revlog(self):
+        """simple function to mirror API of other not-really-revlog API"""
+        return self
+
     @util.propertycache
     def revlog_kind(self):
         return self.target[0]