status: use `running_status` in dirstate status
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 20 Feb 2023 17:26:41 +0100
changeset 50134 0d6173373fa5
parent 50133 21b6ce3ade35
child 50135 31be0b46fd47
status: use `running_status` in dirstate status This is the way.
mercurial/context.py
--- a/mercurial/context.py	Mon Feb 20 17:22:57 2023 +0100
+++ b/mercurial/context.py	Mon Feb 20 17:26:41 2023 +0100
@@ -1899,8 +1899,9 @@
         subrepos = []
         if b'.hgsub' in self:
             subrepos = sorted(self.substate)
-        if True:
-            cmp, s, mtime_boundary = self._repo.dirstate.status(
+        dirstate = self._repo.dirstate
+        with dirstate.running_status(self._repo):
+            cmp, s, mtime_boundary = dirstate.status(
                 match, subrepos, ignored=ignored, clean=clean, unknown=unknown
             )