# HG changeset patch # User Pierre-Yves David # Date 2023-02-20 13:55:16 # Node ID ec3631290eb7b611988a9df1312723834eefc11a # Parent 308aff0243aeaaa06426ebd5410ac4cc77c39001 contrib-perf: use `running_status` in `perf::status` This is the way. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -815,7 +815,12 @@ def perfstatus(ui, repo, **opts): ) sum(map(bool, s)) - timer(status_dirstate) + if util.safehasattr(dirstate, 'running_status'): + with dirstate.running_status(repo): + timer(status_dirstate) + dirstate.invalidate() + else: + timer(status_dirstate) else: timer(lambda: sum(map(len, repo.status(unknown=opts[b'unknown'])))) fm.end()