Mercurial > public > mercurial-scm > hg-stable
diff hgext/lfs/wrapper.py @ 46051:4b89cf08d8dc
upgrade: split definition and management of the actions from the main code
This is a second step to clarify and clean up this code. The code responsible
for definition which action exist, are possible and their compatibility if moved
into a sub module.
This clarify the main code and prepare further cleanup.
Differential Revision: https://phab.mercurial-scm.org/D9477
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 01 Dec 2020 15:11:06 +0100 |
parents | f105c49e89cd |
children | 481d9aed669c |
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py Tue Dec 01 09:13:08 2020 +0100 +++ b/hgext/lfs/wrapper.py Tue Dec 01 15:11:06 2020 +0100 @@ -28,13 +28,15 @@ pycompat, revlog, scmutil, - upgrade, util, vfs as vfsmod, wireprotov1server, ) -from mercurial.upgrade_utils import engine as upgrade_engine +from mercurial.upgrade_utils import ( + actions as upgrade_actions, + engine as upgrade_engine, +) from mercurial.interfaces import repository @@ -539,8 +541,8 @@ lfutil.link(srclfsvfs.join(oid), dstlfsvfs.join(oid)) -@eh.wrapfunction(upgrade, b'preservedrequirements') -@eh.wrapfunction(upgrade, b'supporteddestrequirements') +@eh.wrapfunction(upgrade_actions, b'preservedrequirements') +@eh.wrapfunction(upgrade_actions, b'supporteddestrequirements') def upgraderequirements(orig, repo): reqs = orig(repo) if b'lfs' in repo.requirements: