changeset 50192:ec3631290eb7

contrib-perf: use `running_status` in `perf::status` This is the way.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 20 Feb 2023 14:55:16 +0100
parents 308aff0243ae
children c6df5349183b
files contrib/perf.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Mon Feb 20 17:16:52 2023 +0100
+++ b/contrib/perf.py	Mon Feb 20 14:55:16 2023 +0100
@@ -815,7 +815,12 @@
             )
             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()