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.
--- 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."""