Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
29067:207c0db08953 | 29068:305f9c36a0f5 |
---|---|
65 | 65 |
66 return lfutil.copyandhash(chunks, tmpfile) | 66 return lfutil.copyandhash(chunks, tmpfile) |
67 | 67 |
68 def _verifyfiles(self, contents, filestocheck): | 68 def _verifyfiles(self, contents, filestocheck): |
69 failed = False | 69 failed = False |
70 expectedhashes = [expectedhash | |
71 for cset, filename, expectedhash in filestocheck] | |
72 stats = self._stat(expectedhashes) | |
70 for cset, filename, expectedhash in filestocheck: | 73 for cset, filename, expectedhash in filestocheck: |
71 stat = self._stat([expectedhash])[expectedhash] | 74 stat = stats[expectedhash] |
72 if stat: | 75 if stat: |
73 if stat == 1: | 76 if stat == 1: |
74 self.ui.warn( | 77 self.ui.warn( |
75 _('changeset %s: %s: contents differ\n') | 78 _('changeset %s: %s: contents differ\n') |
76 % (cset, filename)) | 79 % (cset, filename)) |