Mercurial > hg
changeset 18573:003730ca254d
largefiles: fold oddly named _verify into remotestore.exists
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 08 Feb 2013 13:00:08 +0100 |
parents | 5fe58f9332a4 |
children | 4db9e31ae605 |
files | hgext/largefiles/basestore.py hgext/largefiles/remotestore.py |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/basestore.py Fri Feb 08 07:09:48 2013 -0600 +++ b/hgext/largefiles/basestore.py Fri Feb 08 13:00:08 2013 +0100 @@ -43,7 +43,8 @@ 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):
--- a/hgext/largefiles/remotestore.py Fri Feb 08 07:09:48 2013 -0600 +++ b/hgext/largefiles/remotestore.py Fri Feb 08 13:00:08 2013 +0100 @@ -29,7 +29,7 @@ _('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 @@ 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: