diff hgext/largefiles/remotestore.py @ 18482:6f219eb83435 stable

largefiles: adapt verify to batched remote statlfile (issue3780) 9e1616307c4c introduced batching of statlfile, but not all codepaths got converted. 'hg verify' with a remotestore could thus crash with TypeError: 'builtin_function_or_method' object is not iterable Also, the 'hash' variable was used without assigning to it. Don't use variable names that collide with Python built-in functions. Instead we use 'expecthash' as in localstore. The tests for this issue covers an untested area. The tests happens to also reveal incorrect attempts at getting non-existing largefiles, bad server side handling of that, and corruption issues - all to be fixed later.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 28 Jan 2013 15:19:44 +0100
parents ed647c59753b
children d43823f928fe
line wrap: on
line diff
--- a/hgext/largefiles/remotestore.py	Mon Jan 28 15:19:44 2013 +0100
+++ b/hgext/largefiles/remotestore.py	Mon Jan 28 15:19:44 2013 +0100
@@ -87,7 +87,8 @@
 
         verified.add(key)
 
-        stat = self._stat(hash)
+        expecthash = fctx.data()[0:40]
+        stat = self._stat([expecthash])[expecthash]
         if not stat:
             return False
         elif stat == 1: