remotefilelog: drop dead code
As pytype flagged bug in this method it highlighted that this methode being
never called anywhere.
--- 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)