changeset 51303:e5b710ce643a

remotefilelog: drop dead code As pytype flagged bug in this method it highlighted that this methode being never called anywhere.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 19 Dec 2023 22:21:31 +0100
parents 27c8af87a0c9
children d91b55371d6f
files hgext/remotefilelog/remotefilelog.py
diffstat 1 files changed, 0 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- 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)