upgrade: use actual filelog to convert filelog
authorBoris Feld <boris.feld@octobus.net>
Thu, 07 Dec 2017 22:37:18 +0100
changeset 35344 8f3f8b8dbab7
parent 35343 06987c6971be
child 35345 6226668a7169
upgrade: use actual filelog to convert filelog Extensions can add extra logic related to the config, so we must use the actual class. The path used needs minimal transformation for this to work.
mercurial/upgrade.py
--- a/mercurial/upgrade.py	Thu Dec 07 18:56:10 2017 +0100
+++ b/mercurial/upgrade.py	Thu Dec 07 22:37:18 2017 +0100
@@ -14,6 +14,7 @@
 from . import (
     changelog,
     error,
+    filelog,
     hg,
     localrepo,
     manifest,
@@ -413,9 +414,8 @@
         mandir = path[:-len('00manifest.i')]
         return manifest.manifestrevlog(repo.svfs, dir=mandir)
     else:
-        # Filelogs don't do anything special with settings. So we can use a
-        # vanilla revlog.
-        return revlog.revlog(repo.svfs, path)
+        #reverse of "/".join(("data", path + ".i"))
+        return filelog.filelog(repo.svfs, path[5:-2])
 
 def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, aggressivemergedeltas):
     """Copy revlogs between 2 repos."""