perf: stop creating new revlog by hand in perftags
It's better to let the repository logic create its own object. We now just clear
the cache. New object will be automatically created from there.
--- a/contrib/perf.py Mon Nov 26 00:23:12 2018 +0100
+++ b/contrib/perf.py Sun Nov 25 13:37:53 2018 +0100
@@ -540,18 +540,12 @@
@command(b'perftags', formatteropts)
def perftags(ui, repo, **opts):
- import mercurial.changelog
- import mercurial.manifest
-
opts = _byteskwargs(opts)
timer, fm = gettimer(ui, opts)
- svfs = getsvfs(repo)
repocleartagscache = repocleartagscachefunc(repo)
def s():
- repo.changelog = mercurial.changelog.changelog(svfs)
- rootmanifest = mercurial.manifest.manifestrevlog(svfs)
- repo.manifestlog = mercurial.manifest.manifestlog(svfs, repo,
- rootmanifest)
+ clearchangelog(repo)
+ clearfilecache(repo.unfiltered(), 'manifest')
repocleartagscache()
def t():
return len(repo.tags())