hgext/remotefilelog/fileserverclient.py
changeset 48946 642e31cb55f0
parent 48875 6000f5b25c9b
child 50925 d718eddf01d9
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
   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 
   141 
   141 
   142 class cacheconnection(object):
   142 class cacheconnection:
   143     """The connection for communicating with the remote cache. Performs
   143     """The connection for communicating with the remote cache. Performs
   144     gets and sets by communicating with an external process that has the
   144     gets and sets by communicating with an external process that has the
   145     cache-specific implementation.
   145     cache-specific implementation.
   146     """
   146     """
   147 
   147 
   300     # End the command
   300     # End the command
   301     pipeo.write(b'\n')
   301     pipeo.write(b'\n')
   302     pipeo.flush()
   302     pipeo.flush()
   303 
   303 
   304 
   304 
   305 class fileserverclient(object):
   305 class fileserverclient:
   306     """A client for requesting files from the remote file server."""
   306     """A client for requesting files from the remote file server."""
   307 
   307 
   308     def __init__(self, repo):
   308     def __init__(self, repo):
   309         ui = repo.ui
   309         ui = repo.ui
   310         self.repo = repo
   310         self.repo = repo
   515         else:
   515         else:
   516             # If no cache process is specified, we fake one that always
   516             # If no cache process is specified, we fake one that always
   517             # returns cache misses.  This enables tests to run easily
   517             # returns cache misses.  This enables tests to run easily
   518             # and may eventually allow us to be a drop in replacement
   518             # and may eventually allow us to be a drop in replacement
   519             # for the largefiles extension.
   519             # for the largefiles extension.
   520             class simplecache(object):
   520             class simplecache:
   521                 def __init__(self):
   521                 def __init__(self):
   522                     self.missingids = []
   522                     self.missingids = []
   523                     self.connected = True
   523                     self.connected = True
   524 
   524 
   525                 def close(self):
   525                 def close(self):