diff hgext/lfs/wrapper.py @ 46050:f105c49e89cd

upgrade: split actual upgrade code away from the main module The main module is getting big and hard to follow. So we are splitting all the logic to actually run an upgrade in a sub module. It nicely highlight that there are very few actual call point to the code we just moved. Differential Revision: https://phab.mercurial-scm.org/D9476
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 01 Dec 2020 09:13:08 +0100
parents 89a2afe31e82
children 4b89cf08d8dc
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py	Sat Dec 05 23:11:49 2020 +0100
+++ b/hgext/lfs/wrapper.py	Tue Dec 01 09:13:08 2020 +0100
@@ -34,6 +34,8 @@
     wireprotov1server,
 )
 
+from mercurial.upgrade_utils import engine as upgrade_engine
+
 from mercurial.interfaces import repository
 
 from mercurial.utils import (
@@ -520,7 +522,7 @@
     remoteblob.writebatch(pointers, repo.svfs.lfslocalblobstore)
 
 
-@eh.wrapfunction(upgrade, b'_finishdatamigration')
+@eh.wrapfunction(upgrade_engine, b'_finishdatamigration')
 def upgradefinishdatamigration(orig, ui, srcrepo, dstrepo, requirements):
     orig(ui, srcrepo, dstrepo, requirements)