diff --git a/hgext/largefiles/basestore.py b/hgext/largefiles/basestore.py --- a/hgext/largefiles/basestore.py +++ b/hgext/largefiles/basestore.py @@ -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): diff --git a/hgext/largefiles/remotestore.py b/hgext/largefiles/remotestore.py --- a/hgext/largefiles/remotestore.py +++ b/hgext/largefiles/remotestore.py @@ -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: