hgext/remotefilelog/fileserverclient.py
changeset 50925 d718eddf01d9
parent 48946 642e31cb55f0
child 51126 1625fe807c04
equal deleted inserted replaced
50924:7a8ea1397816 50925:d718eddf01d9
    90             if (
    90             if (
    91                 constants.NETWORK_CAP_LEGACY_SSH_GETFILES
    91                 constants.NETWORK_CAP_LEGACY_SSH_GETFILES
    92                 not in self.capabilities()
    92                 not in self.capabilities()
    93             ):
    93             ):
    94                 return
    94                 return
    95             if not util.safehasattr(self, '_localrepo'):
    95             if not hasattr(self, '_localrepo'):
    96                 return
    96                 return
    97             if (
    97             if (
    98                 constants.SHALLOWREPO_REQUIREMENT
    98                 constants.SHALLOWREPO_REQUIREMENT
    99                 not in self._localrepo.requirements
    99                 not in self._localrepo.requirements
   100             ):
   100             ):
   130                 command, args, **opts
   130                 command, args, **opts
   131             )
   131             )
   132 
   132 
   133         def _callstream(self, command, **opts):
   133         def _callstream(self, command, **opts):
   134             supertype = super(remotefilepeer, self)
   134             supertype = super(remotefilepeer, self)
   135             if not util.safehasattr(supertype, '_sendrequest'):
   135             if not hasattr(supertype, '_sendrequest'):
   136                 self._updatecallstreamopts(command, pycompat.byteskwargs(opts))
   136                 self._updatecallstreamopts(command, pycompat.byteskwargs(opts))
   137             return super(remotefilepeer, self)._callstream(command, **opts)
   137             return super(remotefilepeer, self)._callstream(command, **opts)
   138 
   138 
   139     peer.__class__ = remotefilepeer
   139     peer.__class__ = remotefilepeer
   140 
   140 
   639                 )
   639                 )
   640             fetchcost += time.time() - start
   640             fetchcost += time.time() - start
   641             self._lfsprefetch(fileids)
   641             self._lfsprefetch(fileids)
   642 
   642 
   643     def _lfsprefetch(self, fileids):
   643     def _lfsprefetch(self, fileids):
   644         if not _lfsmod or not util.safehasattr(
   644         if not _lfsmod or not hasattr(self.repo.svfs, b'lfslocalblobstore'):
   645             self.repo.svfs, b'lfslocalblobstore'
       
   646         ):
       
   647             return
   645             return
   648         if not _lfsmod.wrapper.candownload(self.repo):
   646         if not _lfsmod.wrapper.candownload(self.repo):
   649             return
   647             return
   650         pointers = []
   648         pointers = []
   651         store = self.repo.svfs.lfslocalblobstore
   649         store = self.repo.svfs.lfslocalblobstore