##// END OF EJS Templates
lfs: prefetch lfs blobs during revert...
Matt Harbison -
r35942:d857cad5 default
parent child Browse files
Show More
@@ -333,6 +333,7 b' def extsetup(ui):'
333 wrapfunction(hg, 'postshare', wrapper.hgpostshare)
333 wrapfunction(hg, 'postshare', wrapper.hgpostshare)
334
334
335 wrapfunction(merge, 'applyupdates', wrapper.mergemodapplyupdates)
335 wrapfunction(merge, 'applyupdates', wrapper.mergemodapplyupdates)
336 wrapfunction(cmdutil, '_prefetchfiles', wrapper.cmdutilprefetchfiles)
336
337
337 # Make bundle choose changegroup3 instead of changegroup2. This affects
338 # Make bundle choose changegroup3 instead of changegroup2. This affects
338 # "hg bundle" command. Note: it does not cover all bundle formats like
339 # "hg bundle" command. Note: it does not cover all bundle formats like
@@ -266,6 +266,12 b' def _prefetchfiles(repo, ctx, files):'
266 if pointers:
266 if pointers:
267 repo.svfs.lfsremoteblobstore.readbatch(pointers, localstore)
267 repo.svfs.lfsremoteblobstore.readbatch(pointers, localstore)
268
268
269 def cmdutilprefetchfiles(orig, repo, ctx, files):
270 """Prefetch the indicated files before they are accessed by a command."""
271 orig(repo, ctx, files)
272
273 _prefetchfiles(repo, ctx, files)
274
269 def mergemodapplyupdates(orig, repo, actions, wctx, mctx, overwrite,
275 def mergemodapplyupdates(orig, repo, actions, wctx, mctx, overwrite,
270 labels=None):
276 labels=None):
271 """Ensure that the required LFS blobs are present before applying updates,
277 """Ensure that the required LFS blobs are present before applying updates,
@@ -149,6 +149,33 b' Test a corrupted file upload'
149 (run hg verify)
149 (run hg verify)
150 [255]
150 [255]
151
151
152 Revert will prefetch blobs in a group
153
154 $ rm -rf .hg/store/lfs
155 $ rm -rf `hg config lfs.usercache`
156 $ rm *
157 $ hg revert --all -r 1 -v
158 adding a
159 reverting b
160 reverting c
161 reverting d
162 lfs: need to transfer 4 objects (63 bytes)
163 lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
164 lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache
165 lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
166 lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes)
167 lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b
168 lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes)
169 lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache
170 lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19
171 lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes)
172 lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache
173 lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998
174 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
175 lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store
176 lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store
177 lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store
178
152 Check error message when the remote missed a blob:
179 Check error message when the remote missed a blob:
153
180
154 $ echo FFFFF > b
181 $ echo FFFFF > b
General Comments 0
You need to be logged in to leave comments. Login now