hgext/largefiles/wirestore.py
changeset 28439 b6e71f8af5b8
parent 19008 9d33d6e0d442
child 29316 28dfcf3d0ad3
--- a/hgext/largefiles/wirestore.py	Tue Mar 01 18:41:43 2016 -0500
+++ b/hgext/largefiles/wirestore.py	Wed Mar 02 13:13:05 2016 -0500
@@ -29,12 +29,8 @@
         '''For each hash, return 0 if it is available, other values if not.
         It is usually 2 if the largefile is missing, but might be 1 the server
         has a corrupted copy.'''
-        batch = self.remote.batch()
-        futures = {}
+        batch = self.remote.iterbatch()
         for hash in hashes:
-            futures[hash] = batch.statlfile(hash)
+            batch.statlfile(hash)
         batch.submit()
-        retval = {}
-        for hash in hashes:
-            retval[hash] = futures[hash].value
-        return retval
+        return dict(zip(hashes, batch.results()))