comparison mercurial/filelog.py @ 39860:d9b3cc3d5d07

filelog: drop index attribute (API) The previous commit removed the last consumer of the "index" attribute on the file storage interface. The index is an extremely low-level data structure that is revlog specific and isn't appropriate to expose as part of a generic storage API. There may be a market for an efficient data structure to obtain metadata on every revision for a file. But if there is, it should be designed using e.g. named attributes for lookup instead of a list-like of 8-tuples. Let's drop the attribute from filelog and remove the attribute from the file storage interface. Differential Revision: https://phab.mercurial-scm.org/D4720
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 20 Sep 2018 19:31:07 -0700
parents 32d3ed3023bb
children 5a9ab91e0a45
comparison
equal deleted inserted replaced
39859:32d3ed3023bb 39860:d9b3cc3d5d07
23 '/'.join(('data', path + '.i')), 23 '/'.join(('data', path + '.i')),
24 censorable=True) 24 censorable=True)
25 # Full name of the user visible file, relative to the repository root. 25 # Full name of the user visible file, relative to the repository root.
26 # Used by LFS. 26 # Used by LFS.
27 self._revlog.filename = path 27 self._revlog.filename = path
28 # Used by repo upgrade.
29 self.index = self._revlog.index
30 # Used by changegroup generation. 28 # Used by changegroup generation.
31 self._generaldelta = self._revlog._generaldelta 29 self._generaldelta = self._revlog._generaldelta
32 30
33 def __len__(self): 31 def __len__(self):
34 return len(self._revlog) 32 return len(self._revlog)