filelog: remove version attribute (API)
authorGregory Szorc <gregory.szorc@gmail.com>
Wed, 19 Sep 2018 11:20:02 -0700
changeset 39843 68282a7b29a7
parent 39842 97986c9c69d3
child 39844 0cb3e02e1d1b
filelog: remove version attribute (API) This was only used by verify code. The check it was used for is now implemented as part of the verifyintegrity() implementation. The attribute is now unused, is revlog-specific, and isn't appropriate to be exposing on the file storage interface. So drop it. Differential Revision: https://phab.mercurial-scm.org/D4702
mercurial/filelog.py
mercurial/repository.py
tests/simplestorerepo.py
--- a/mercurial/filelog.py	Wed Sep 19 11:17:28 2018 -0700
+++ b/mercurial/filelog.py	Wed Sep 19 11:20:02 2018 -0700
@@ -27,8 +27,6 @@
         self.filename = path
         # Used by repo upgrade.
         self.index = self._revlog.index
-        # Used by verify.
-        self.version = self._revlog.version
         # Used by changegroup generation.
         self._generaldelta = self._revlog._generaldelta
 
--- a/mercurial/repository.py	Wed Sep 19 11:17:28 2018 -0700
+++ b/mercurial/repository.py	Wed Sep 19 11:20:02 2018 -0700
@@ -737,12 +737,6 @@
 class ifilestorage(ifileindex, ifiledata, ifilemutation):
     """Complete storage interface for a single tracked file."""
 
-    version = interfaceutil.Attribute(
-        """Version number of storage.
-
-        TODO this feels revlog centric and could likely be removed.
-        """)
-
     _generaldelta = interfaceutil.Attribute(
         """Whether deltas can be against any parent revision.
 
--- a/tests/simplestorerepo.py	Wed Sep 19 11:17:28 2018 -0700
+++ b/tests/simplestorerepo.py	Wed Sep 19 11:20:02 2018 -0700
@@ -109,8 +109,6 @@
         # This is used by changegroup code :/
         self._generaldelta = True
 
-        self.version = 1
-
     def _refreshindex(self):
         self._indexbynode.clear()
         self._indexbyrev.clear()