Show More
@@ -43,7 +43,8 b' class basestore(object):' | |||||
43 | raise NotImplementedError('abstract method') |
|
43 | raise NotImplementedError('abstract method') | |
44 |
|
44 | |||
45 | def exists(self, hashes): |
|
45 | def exists(self, hashes): | |
46 |
'''Check to see if the store contains the given hashes. |
|
46 | '''Check to see if the store contains the given hashes. Given an | |
|
47 | iterable of hashes it returns a mapping from hash to bool.''' | |||
47 | raise NotImplementedError('abstract method') |
|
48 | raise NotImplementedError('abstract method') | |
48 |
|
49 | |||
49 | def get(self, files): |
|
50 | def get(self, files): |
@@ -29,7 +29,7 b' class remotestore(basestore.basestore):' | |||||
29 | _('remotestore: put %s to remote store %s') % (source, self.url)) |
|
29 | _('remotestore: put %s to remote store %s') % (source, self.url)) | |
30 |
|
30 | |||
31 | def exists(self, hashes): |
|
31 | def exists(self, hashes): | |
32 | return self._verify(hashes) |
|
32 | return dict((h, s == 0) for (h, s) in self._stat(hashes).iteritems()) | |
33 |
|
33 | |||
34 | def sendfile(self, filename, hash): |
|
34 | def sendfile(self, filename, hash): | |
35 | self.ui.debug('remotestore: sendfile(%s, %s)\n' % (filename, hash)) |
|
35 | self.ui.debug('remotestore: sendfile(%s, %s)\n' % (filename, hash)) | |
@@ -76,9 +76,6 b' class remotestore(basestore.basestore):' | |||||
76 | infile = lfutil.limitreader(infile, length) |
|
76 | infile = lfutil.limitreader(infile, length) | |
77 | return lfutil.copyandhash(lfutil.blockstream(infile), tmpfile) |
|
77 | return lfutil.copyandhash(lfutil.blockstream(infile), tmpfile) | |
78 |
|
78 | |||
79 | def _verify(self, hashes): |
|
|||
80 | return dict((h, s == 0) for (h, s) in self._stat(hashes).iteritems()) |
|
|||
81 |
|
||||
82 | def _verifyfile(self, cctx, cset, contents, standin, verified): |
|
79 | def _verifyfile(self, cctx, cset, contents, standin, verified): | |
83 | filename = lfutil.splitstandin(standin) |
|
80 | filename = lfutil.splitstandin(standin) | |
84 | if not filename: |
|
81 | if not filename: |
General Comments 0
You need to be logged in to leave comments.
Login now