comparison mercurial/upgrade.py @ 35344:8f3f8b8dbab7

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.
author Boris Feld <boris.feld@octobus.net>
date Thu, 07 Dec 2017 22:37:18 +0100
parents 06987c6971be
children 6226668a7169
comparison
equal deleted inserted replaced
35343:06987c6971be 35344:8f3f8b8dbab7
12 12
13 from .i18n import _ 13 from .i18n import _
14 from . import ( 14 from . import (
15 changelog, 15 changelog,
16 error, 16 error,
17 filelog,
17 hg, 18 hg,
18 localrepo, 19 localrepo,
19 manifest, 20 manifest,
20 revlog, 21 revlog,
21 scmutil, 22 scmutil,
411 return changelog.changelog(repo.svfs) 412 return changelog.changelog(repo.svfs)
412 elif path.endswith('00manifest.i'): 413 elif path.endswith('00manifest.i'):
413 mandir = path[:-len('00manifest.i')] 414 mandir = path[:-len('00manifest.i')]
414 return manifest.manifestrevlog(repo.svfs, dir=mandir) 415 return manifest.manifestrevlog(repo.svfs, dir=mandir)
415 else: 416 else:
416 # Filelogs don't do anything special with settings. So we can use a 417 #reverse of "/".join(("data", path + ".i"))
417 # vanilla revlog. 418 return filelog.filelog(repo.svfs, path[5:-2])
418 return revlog.revlog(repo.svfs, path)
419 419
420 def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, aggressivemergedeltas): 420 def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, aggressivemergedeltas):
421 """Copy revlogs between 2 repos.""" 421 """Copy revlogs between 2 repos."""
422 revcount = 0 422 revcount = 0
423 srcsize = 0 423 srcsize = 0