mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
largefiles: fold oddly named _verify into remotestore.exists
This commit is contained in:
parent
5c8acaf5b4
commit
e9a72ba5f1
@ -43,7 +43,8 @@ class basestore(object):
|
||||
raise NotImplementedError('abstract method')
|
||||
|
||||
def exists(self, hashes):
|
||||
'''Check to see if the store contains the given hashes.'''
|
||||
'''Check to see if the store contains the given hashes. Given an
|
||||
iterable of hashes it returns a mapping from hash to bool.'''
|
||||
raise NotImplementedError('abstract method')
|
||||
|
||||
def get(self, files):
|
||||
|
@ -29,7 +29,7 @@ class remotestore(basestore.basestore):
|
||||
_('remotestore: put %s to remote store %s') % (source, self.url))
|
||||
|
||||
def exists(self, hashes):
|
||||
return self._verify(hashes)
|
||||
return dict((h, s == 0) for (h, s) in self._stat(hashes).iteritems())
|
||||
|
||||
def sendfile(self, filename, hash):
|
||||
self.ui.debug('remotestore: sendfile(%s, %s)\n' % (filename, hash))
|
||||
@ -76,9 +76,6 @@ class remotestore(basestore.basestore):
|
||||
infile = lfutil.limitreader(infile, length)
|
||||
return lfutil.copyandhash(lfutil.blockstream(infile), tmpfile)
|
||||
|
||||
def _verify(self, hashes):
|
||||
return dict((h, s == 0) for (h, s) in self._stat(hashes).iteritems())
|
||||
|
||||
def _verifyfile(self, cctx, cset, contents, standin, verified):
|
||||
filename = lfutil.splitstandin(standin)
|
||||
if not filename:
|
||||
|
Loading…
Reference in New Issue
Block a user