Show More
@@ -18,6 +18,7 b' import zlib' | |||
|
18 | 18 | from .i18n import _ |
|
19 | 19 | |
|
20 | 20 | from . import ( |
|
21 | cmdutil, | |
|
21 | 22 | error, |
|
22 | 23 | formatter, |
|
23 | 24 | match as matchmod, |
@@ -337,6 +338,7 b' def archive(repo, dest, node, kind, deco' | |||
|
337 | 338 | total = len(files) |
|
338 | 339 | if total: |
|
339 | 340 | files.sort() |
|
341 | cmdutil._prefetchfiles(repo, ctx, files) | |
|
340 | 342 | repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total) |
|
341 | 343 | for i, f in enumerate(files): |
|
342 | 344 | ff = ctx.flags(f) |
@@ -919,9 +919,13 b' class hgsubrepo(abstractsubrepo):' | |||
|
919 | 919 | @annotatesubrepoerror |
|
920 | 920 | def archive(self, archiver, prefix, match=None, decode=True): |
|
921 | 921 | self._get(self._state + ('hg',)) |
|
922 | total = abstractsubrepo.archive(self, archiver, prefix, match) | |
|
922 | files = self.files() | |
|
923 | if match: | |
|
924 | files = [f for f in files if match(f)] | |
|
923 | 925 | rev = self._state[1] |
|
924 | 926 | ctx = self._repo[rev] |
|
927 | cmdutil._prefetchfiles(self._repo, ctx, files) | |
|
928 | total = abstractsubrepo.archive(self, archiver, prefix, match) | |
|
925 | 929 | for subpath in ctx.substate: |
|
926 | 930 | s = subrepo(ctx, subpath, True) |
|
927 | 931 | submatch = matchmod.subdirmatcher(subpath, match) |
@@ -149,6 +149,34 b' Test a corrupted file upload' | |||
|
149 | 149 | (run hg verify) |
|
150 | 150 | [255] |
|
151 | 151 | |
|
152 | Archive will prefetch blobs in a group | |
|
153 | ||
|
154 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` | |
|
155 | $ hg archive -vr 1 ../archive | |
|
156 | lfs: need to transfer 4 objects (63 bytes) | |
|
157 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
|
158 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
|
159 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
|
160 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
|
161 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
|
162 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
|
163 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
|
164 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
|
165 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
|
166 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
|
167 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
|
168 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
|
169 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
|
170 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
|
171 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
|
172 | $ find ../archive | sort | |
|
173 | ../archive | |
|
174 | ../archive/.hg_archival.txt | |
|
175 | ../archive/a | |
|
176 | ../archive/b | |
|
177 | ../archive/c | |
|
178 | ../archive/d | |
|
179 | ||
|
152 | 180 | Revert will prefetch blobs in a group |
|
153 | 181 | |
|
154 | 182 | $ rm -rf .hg/store/lfs |
General Comments 0
You need to be logged in to leave comments.
Login now