Mercurial > hg
diff hgext/largefiles/overrides.py @ 46047: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 | 89a2afe31e82 |
children | bb3a5c0df06b 32da58916fd0 |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Tue Dec 01 09:13:08 2020 +0100 +++ b/hgext/largefiles/overrides.py Tue Dec 01 15:11:06 2020 +0100 @@ -37,11 +37,14 @@ scmutil, smartset, subrepo, - upgrade, url as urlmod, util, ) +from mercurial.upgrade_utils import ( + actions as upgrade_actions, +) + from . import ( lfcommands, lfutil, @@ -1837,8 +1840,8 @@ return result -@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'largefiles' in repo.requirements: