Mercurial > hg
changeset 51413:8fc92193a2cf
phases: use a more generic way to trigger a phases computation for perf
Querying the tip most revision will require the cache to warm the same as
calling the dedicated method. This avoid using a method that is mostly meant for
internal use and will be renamed in a coming changesets.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 22 Feb 2024 10:56:05 +0100 |
parents | 89b638afeb07 |
children | 630d5283ee82 |
files | contrib/perf.py tests/test-contrib-perf.t |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Wed Feb 21 12:01:09 2024 +0100 +++ b/contrib/perf.py Thu Feb 22 10:56:05 2024 +0100 @@ -1719,6 +1719,7 @@ timer, fm = gettimer(ui, opts) _phases = repo._phasecache full = opts.get(b'full') + tip_rev = repo.changelog.tiprev() def d(): phases = _phases @@ -1726,7 +1727,7 @@ clearfilecache(repo, b'_phasecache') phases = repo._phasecache phases.invalidate() - phases.loadphaserevs(repo) + phases.phase(repo, tip_rev) timer(d) fm.end()