Mercurial > hg
diff hgext/largefiles/remotestore.py @ 29068:305f9c36a0f5
largefiles: makes verify batching stat calls to remote
Instead of sending stat calls for each files separately, it sends
one batch call with stat invocations for all files.
author | liscju <piotr.listkiewicz@gmail.com> |
---|---|
date | Tue, 03 May 2016 23:48:31 +0200 |
parents | 207c0db08953 |
children | fd288d118074 |
line wrap: on
line diff
--- a/hgext/largefiles/remotestore.py Tue May 03 23:31:32 2016 +0200 +++ b/hgext/largefiles/remotestore.py Tue May 03 23:48:31 2016 +0200 @@ -67,8 +67,11 @@ def _verifyfiles(self, contents, filestocheck): failed = False + expectedhashes = [expectedhash + for cset, filename, expectedhash in filestocheck] + stats = self._stat(expectedhashes) for cset, filename, expectedhash in filestocheck: - stat = self._stat([expectedhash])[expectedhash] + stat = stats[expectedhash] if stat: if stat == 1: self.ui.warn(