equal
deleted
inserted
replaced
28 |
28 |
29 def _get(self, hash): |
29 def _get(self, hash): |
30 return self.remote.getlfile(hash) |
30 return self.remote.getlfile(hash) |
31 |
31 |
32 def _stat(self, hashes): |
32 def _stat(self, hashes): |
33 '''For each hash, return 0 if it is available, other values if not. |
33 """For each hash, return 0 if it is available, other values if not. |
34 It is usually 2 if the largefile is missing, but might be 1 the server |
34 It is usually 2 if the largefile is missing, but might be 1 the server |
35 has a corrupted copy.''' |
35 has a corrupted copy.""" |
36 |
36 |
37 with self.remote.commandexecutor() as e: |
37 with self.remote.commandexecutor() as e: |
38 fs = [] |
38 fs = [] |
39 for hash in hashes: |
39 for hash in hashes: |
40 fs.append((hash, e.callcommand(b'statlfile', {b'sha': hash,}))) |
40 fs.append( |
|
41 ( |
|
42 hash, |
|
43 e.callcommand( |
|
44 b'statlfile', |
|
45 { |
|
46 b'sha': hash, |
|
47 }, |
|
48 ), |
|
49 ) |
|
50 ) |
41 |
51 |
42 return {hash: f.result() for hash, f in fs} |
52 return {hash: f.result() for hash, f in fs} |