hgext/remotefilelog/connectionpool.py
changeset 48946 642e31cb55f0
parent 48935 2cce2fa5bcf7
child 50928 d718eddf01d9
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
    13 )
    13 )
    14 
    14 
    15 _sshv1peer = sshpeer.sshv1peer
    15 _sshv1peer = sshpeer.sshv1peer
    16 
    16 
    17 
    17 
    18 class connectionpool(object):
    18 class connectionpool:
    19     def __init__(self, repo):
    19     def __init__(self, repo):
    20         self._repo = repo
    20         self._repo = repo
    21         self._pool = dict()
    21         self._pool = dict()
    22 
    22 
    23     def get(self, path):
    23     def get(self, path):
    63             for conn in pathpool:
    63             for conn in pathpool:
    64                 conn.close()
    64                 conn.close()
    65             del pathpool[:]
    65             del pathpool[:]
    66 
    66 
    67 
    67 
    68 class connection(object):
    68 class connection:
    69     def __init__(self, pool, peer):
    69     def __init__(self, pool, peer):
    70         self._pool = pool
    70         self._pool = pool
    71         self.peer = peer
    71         self.peer = peer
    72 
    72 
    73     def __enter__(self):
    73     def __enter__(self):