Mercurial > hg
diff hgext/lfs/wrapper.py @ 36142:60dd840a7fdb
merge: invoke scmutil.fileprefetchhooks() prior to applying updates
This moves the file list calculation into core, so other extensions don't need
to duplicate it.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 11 Feb 2018 13:25:56 -0500 |
parents | a991fcc48222 |
children | dcb6fbaa43a8 |
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py Sun Feb 11 00:40:27 2018 -0500 +++ b/hgext/lfs/wrapper.py Sun Feb 11 13:25:56 2018 -0500 @@ -251,9 +251,7 @@ def _prefetchfiles(repo, ctx, files): """Ensure that required LFS blobs are present, fetching them as a group if - needed. - - This is centralized logic for various prefetch hooks.""" + needed.""" pointers = [] localstore = repo.svfs.lfslocalblobstore @@ -266,25 +264,6 @@ if pointers: repo.svfs.lfsremoteblobstore.readbatch(pointers, localstore) -def mergemodapplyupdates(orig, repo, actions, wctx, mctx, overwrite, - labels=None): - """Ensure that the required LFS blobs are present before applying updates, - fetching them as a group if needed. - - This has the effect of ensuring all necessary LFS blobs are present before - making working directory changes during an update (including after clone and - share) or merge.""" - - # Skipping 'a', 'am', 'f', 'r', 'dm', 'e', 'k', 'p' and 'pr', because they - # don't touch mctx. 'cd' is skipped, because changed/deleted never resolves - # to something from the remote side. - oplist = [actions[a] for a in 'g dc dg m'.split()] - - _prefetchfiles(repo, mctx, - [f for sublist in oplist for f, args, msg in sublist]) - - return orig(repo, actions, wctx, mctx, overwrite, labels) - def _canskipupload(repo): # if remotestore is a null store, upload is a no-op and can be skipped return isinstance(repo.svfs.lfsremoteblobstore, blobstore._nullremote)