comparison mercurial/filelog.py @ 47147:8a1a51d31e85

filelog: drop `indexfile` from `filelog` Since `filelog` objects are not revlog (no really, they are not?) we drop the revlog specific attribute. We need to directly access the underlying revlog in a couple of place that already assume that we have a revlog here. This is motivated by future change to that revlog attribute. Differential Revision: https://phab.mercurial-scm.org/D10573
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:22:06 +0200
parents 64cd1496bb70
children a07d5cb03a85
comparison
equal deleted inserted replaced
47146:bc7d465ea11e 47147:8a1a51d31e85
225 sharedfiles=sharedfiles, 225 sharedfiles=sharedfiles,
226 revisionscount=revisionscount, 226 revisionscount=revisionscount,
227 trackedsize=trackedsize, 227 trackedsize=trackedsize,
228 storedsize=storedsize, 228 storedsize=storedsize,
229 ) 229 )
230
231 # TODO these aren't part of the interface and aren't internal methods.
232 # Callers should be fixed to not use them.
233
234 # Used by bundlefilelog, unionfilelog.
235 @property
236 def indexfile(self):
237 return self._revlog.indexfile
238
239 @indexfile.setter
240 def indexfile(self, value):
241 self._revlog.indexfile = value
242 230
243 # Used by repo upgrade. 231 # Used by repo upgrade.
244 def clone(self, tr, destrevlog, **kwargs): 232 def clone(self, tr, destrevlog, **kwargs):
245 if not isinstance(destrevlog, filelog): 233 if not isinstance(destrevlog, filelog):
246 raise error.ProgrammingError(b'expected filelog to clone()') 234 raise error.ProgrammingError(b'expected filelog to clone()')