Mercurial > hg-stable
changeset 40777:415735bfcf2b
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.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sun, 25 Nov 2018 13:37:53 +0100 |
parents | 8edca70dc951 |
children | 594e84a2e574 |
files | contrib/perf.py |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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())