##// END OF EJS Templates
lfs: migrate to the fileprefetch callback mechanism
Matt Harbison -
r36155:a991fcc4 default
parent child Browse files
Show More
@@ -334,7 +334,8 b' def extsetup(ui):'
334 wrapfunction(hg, 'postshare', wrapper.hgpostshare)
334 wrapfunction(hg, 'postshare', wrapper.hgpostshare)
335
335
336 wrapfunction(merge, 'applyupdates', wrapper.mergemodapplyupdates)
336 wrapfunction(merge, 'applyupdates', wrapper.mergemodapplyupdates)
337 wrapfunction(cmdutil, '_prefetchfiles', wrapper.cmdutilprefetchfiles)
337
338 scmutil.fileprefetchhooks.add('lfs', wrapper._prefetchfiles)
338
339
339 # Make bundle choose changegroup3 instead of changegroup2. This affects
340 # Make bundle choose changegroup3 instead of changegroup2. This affects
340 # "hg bundle" command. Note: it does not cover all bundle formats like
341 # "hg bundle" command. Note: it does not cover all bundle formats like
@@ -266,12 +266,6 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
275 def mergemodapplyupdates(orig, repo, actions, wctx, mctx, overwrite,
269 def mergemodapplyupdates(orig, repo, actions, wctx, mctx, overwrite,
276 labels=None):
270 labels=None):
277 """Ensure that the required LFS blobs are present before applying updates,
271 """Ensure that the required LFS blobs are present before applying updates,
General Comments 0
You need to be logged in to leave comments. Login now