D4703: filelog: stop proxying checksize() (API)

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Sep 24 16:12:39 UTC 2018


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This was only used by verify code. And the check using it is now
  implemented as part of verifyintegrity(). The method is unused
  and is revlog-centric, which means it isn't appropriate for the file
  storage interface. So remove it.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4703

AFFECTED FILES
  mercurial/filelog.py
  mercurial/repository.py
  tests/simplestorerepo.py

CHANGE DETAILS

diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -422,10 +422,6 @@
 
         return [b'/'.join((self._storepath, f)) for f in entries]
 
-    # Required by verify.
-    def checksize(self):
-        return 0, 0
-
     def add(self, text, meta, transaction, linkrev, p1, p2):
         if meta or text.startswith(b'\1\n'):
             text = revlog.packmeta(meta, text)
diff --git a/mercurial/repository.py b/mercurial/repository.py
--- a/mercurial/repository.py
+++ b/mercurial/repository.py
@@ -751,12 +751,6 @@
         be a better API for that.
         """
 
-    def checksize():
-        """Obtain the expected sizes of backing files.
-
-        TODO this is used by verify and it should not be part of the interface.
-        """
-
     def verifyintegrity(state):
         """Verifies the integrity of file storage.
 
diff --git a/mercurial/filelog.py b/mercurial/filelog.py
--- a/mercurial/filelog.py
+++ b/mercurial/filelog.py
@@ -121,10 +121,6 @@
     def files(self):
         return self._revlog.files()
 
-    # Used by verify.
-    def checksize(self):
-        return self._revlog.checksize()
-
     def read(self, node):
         t = self.revision(node)
         if not t.startswith('\1\n'):



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list