[PATCH 1 of 5 V3] perf: stop creating new revlog by hand in perftags
Boris Feld
boris.feld at octobus.net
Mon Nov 26 18:26:06 UTC 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1543149473 -3600
# Sun Nov 25 13:37:53 2018 +0100
# Node ID a2a4aabea58bef816eeb53e80ddaf0d438717c66
# Parent cfaf3843491bde30916b89180d5f67561a22da28
# EXP-Topic perf-tags
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r a2a4aabea58b
perf: stop creating new revlog by hand in perftags
It i better to let the repository logic create its own object. We now just clear
the cache. New object will be automatically created from there.
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -546,10 +546,8 @@ def perftags(ui, repo, **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())
More information about the Mercurial-devel
mailing list