comparison mercurial/revlog.py @ 47073:64cd1496bb70

revlog: replace the old `revlog_kind` approach with the new `target` one The new `target` attribute supersedes the previous one. Differential Revision: https://phab.mercurial-scm.org/D10353
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 08 Apr 2021 19:00:21 +0200
parents 4c041c71ec01
children 5554aacd783f
comparison
equal deleted inserted replaced
47072:4c041c71ec01 47073:64cd1496bb70
555 self._chunkclear() 555 self._chunkclear()
556 # revnum -> (chain-length, sum-delta-length) 556 # revnum -> (chain-length, sum-delta-length)
557 self._chaininfocache = util.lrucachedict(500) 557 self._chaininfocache = util.lrucachedict(500)
558 # revlog header -> revlog compressor 558 # revlog header -> revlog compressor
559 self._decompressors = {} 559 self._decompressors = {}
560
561 @util.propertycache
562 def revlog_kind(self):
563 return self.target[0]
560 564
561 @util.propertycache 565 @util.propertycache
562 def _compressor(self): 566 def _compressor(self):
563 engine = util.compengines[self._compengine] 567 engine = util.compengines[self._compengine]
564 return engine.revlogcompressor(self._compengineopts) 568 return engine.revlogcompressor(self._compengineopts)