hgext/largefiles/wirestore.py
changeset 17127 9e1616307c4c
parent 16686 67964cda8701
child 18481 ed647c59753b
equal deleted inserted replaced
17126:8fa8717b47b6 17127:9e1616307c4c
    23         return self.remote.putlfile(hash, fd)
    23         return self.remote.putlfile(hash, fd)
    24 
    24 
    25     def _get(self, hash):
    25     def _get(self, hash):
    26         return self.remote.getlfile(hash)
    26         return self.remote.getlfile(hash)
    27 
    27 
    28     def _stat(self, hash):
    28     def _stat(self, hashes):
    29         return self.remote.statlfile(hash)
    29         batch = self.remote.batch()
       
    30         futures = {}
       
    31         for hash in hashes:
       
    32             futures[hash] = batch.statlfile(hash)
       
    33         batch.submit()
       
    34         retval = {}
       
    35         for hash in hashes:
       
    36             retval[hash] = not futures[hash].value
       
    37         return retval