##// END OF EJS Templates
largefiles: use command executor for batch operation...
Gregory Szorc -
r37650:6c55ce51 default
parent child Browse files
Show More
@@ -32,8 +32,12 b' class wirestore(remotestore.remotestore)'
32 '''For each hash, return 0 if it is available, other values if not.
32 '''For each hash, return 0 if it is available, other values if not.
33 It is usually 2 if the largefile is missing, but might be 1 the server
33 It is usually 2 if the largefile is missing, but might be 1 the server
34 has a corrupted copy.'''
34 has a corrupted copy.'''
35 batch = self.remote.iterbatch()
35
36 for hash in hashes:
36 with self.remote.commandexecutor() as e:
37 batch.statlfile(hash)
37 fs = []
38 batch.submit()
38 for hash in hashes:
39 return dict(zip(hashes, batch.results()))
39 fs.append((hash, e.callcommand('statlfile', {
40 'sha': hash,
41 })))
42
43 return {hash: f.result() for hash, f in fs}
@@ -312,7 +312,7 b' largefiles pulled on update - no server '
312 getting changed largefiles
312 getting changed largefiles
313 using http://localhost:$HGPORT2/
313 using http://localhost:$HGPORT2/
314 sending capabilities command
314 sending capabilities command
315 sending batch command
315 sending statlfile command
316 getting largefiles: 0/1 files (0.00%)
316 getting largefiles: 0/1 files (0.00%)
317 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
317 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
318 sending getlfile command
318 sending getlfile command
@@ -400,7 +400,7 b' available locally.'
400 searching 3 changesets for largefiles
400 searching 3 changesets for largefiles
401 verified existence of 3 revisions of 3 largefiles
401 verified existence of 3 revisions of 3 largefiles
402 $ tail -1 access.log
402 $ tail -1 access.log
403 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3Dc8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
403 $LOCALIP - - [$LOGDATE$] "GET /?cmd=statlfile HTTP/1.1" 200 - x-hgarg-1:sha=c8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
404
404
405 $ killdaemons.py
405 $ killdaemons.py
406
406
General Comments 0
You need to be logged in to leave comments. Login now