comparison mercurial/revlog.py @ 50637: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
comparison
equal deleted inserted replaced
50636:c90ea9bbf327 50637:32837c7e2e4b
661 # revnum -> (chain-length, sum-delta-length) 661 # revnum -> (chain-length, sum-delta-length)
662 self._chaininfocache = util.lrucachedict(500) 662 self._chaininfocache = util.lrucachedict(500)
663 # revlog header -> revlog compressor 663 # revlog header -> revlog compressor
664 self._decompressors = {} 664 self._decompressors = {}
665 665
666 def get_revlog(self):
667 """simple function to mirror API of other not-really-revlog API"""
668 return self
669
666 @util.propertycache 670 @util.propertycache
667 def revlog_kind(self): 671 def revlog_kind(self):
668 return self.target[0] 672 return self.target[0]
669 673
670 @util.propertycache 674 @util.propertycache