hgext/largefiles/wirestore.py
branchstable
changeset 18481 ed647c59753b
parent 17127 9e1616307c4c
child 19008 9d33d6e0d442
equal deleted inserted replaced
18480:5ef3c7081008 18481:ed647c59753b
    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, hashes):
    28     def _stat(self, hashes):
       
    29         '''For each hash, return 2 if the largefile is missing, 1 if it has a
       
    30         mismatched checksum, or 0 if it is in good condition'''
    29         batch = self.remote.batch()
    31         batch = self.remote.batch()
    30         futures = {}
    32         futures = {}
    31         for hash in hashes:
    33         for hash in hashes:
    32             futures[hash] = batch.statlfile(hash)
    34             futures[hash] = batch.statlfile(hash)
    33         batch.submit()
    35         batch.submit()
    34         retval = {}
    36         retval = {}
    35         for hash in hashes:
    37         for hash in hashes:
    36             retval[hash] = not futures[hash].value
    38             retval[hash] = futures[hash].value
    37         return retval
    39         return retval