# HG changeset patch # User Pierre-Yves David # Date 2024-02-22 09:56:05 # Node ID 8fc92193a2cfc10e8358ab9f26ec400a7d1e81a0 # Parent 89b638afeb079804fc32bfb6da613f8e94d8f015 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. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -1719,6 +1719,7 @@ def perfphases(ui, repo, **opts): 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 @@ def perfphases(ui, repo, **opts): clearfilecache(repo, b'_phasecache') phases = repo._phasecache phases.invalidate() - phases.loadphaserevs(repo) + phases.phase(repo, tip_rev) timer(d) fm.end() diff --git a/tests/test-contrib-perf.t b/tests/test-contrib-perf.t --- a/tests/test-contrib-perf.t +++ b/tests/test-contrib-perf.t @@ -293,6 +293,7 @@ perfstatus $ hg perfwalk $ hg perfparents $ hg perfdiscovery -q . + $ hg perf::phases Test run control ----------------