remotefilelog: drop dead code
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 19 Dec 2023 22:21:31 +0100
changeset 51303 e5b710ce643a
parent 51302 27c8af87a0c9
child 51304 d91b55371d6f
remotefilelog: drop dead code As pytype flagged bug in this method it highlighted that this methode being never called anywhere.
hgext/remotefilelog/remotefilelog.py
--- a/hgext/remotefilelog/remotefilelog.py	Tue Dec 19 22:07:59 2023 +0100
+++ b/hgext/remotefilelog/remotefilelog.py	Tue Dec 19 22:21:31 2023 +0100
@@ -7,7 +7,6 @@
 # GNU General Public License version 2 or any later version.
 
 import collections
-import os
 
 from mercurial.node import bin
 from mercurial.i18n import _
@@ -22,7 +21,6 @@
 
 from . import (
     constants,
-    fileserverclient,
     shallowutil,
 )
 
@@ -387,33 +385,6 @@
     def rawdata(self, node):
         return self.revision(node, raw=False)
 
-    def _read(self, id):
-        """reads the raw file blob from disk, cache, or server"""
-        fileservice = self.repo.fileservice
-        localcache = fileservice.localcache
-        cachekey = fileserverclient.getcachekey(
-            self.repo.name, self.filename, id
-        )
-        try:
-            return localcache.read(cachekey)
-        except KeyError:
-            pass
-
-        localkey = fileserverclient.getlocalkey(self.filename, id)
-        localpath = os.path.join(self.localpath, localkey)
-        try:
-            return shallowutil.readfile(localpath)
-        except IOError:
-            pass
-
-        fileservice.prefetch([(self.filename, id)])
-        try:
-            return localcache.read(cachekey)
-        except KeyError:
-            pass
-
-        raise error.LookupError(id, self.filename, _(b'no node'))
-
     def ancestormap(self, node):
         return self.repo.metadatastore.getancestors(self.filename, node)