dirstate: introduce a (noop) running_status context
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 20 Feb 2023 15:18:07 +0100
changeset 50181 3dd7e54ff7f1
parent 50180 e5f5f1c1c452
child 50182 21b6ce3ade35
dirstate: introduce a (noop) running_status context Let us start with a simplistic context so we can scope the appropriate code before adding more logic.
mercurial/dirstate.py
--- a/mercurial/dirstate.py	Tue Feb 21 22:14:12 2023 +0100
+++ b/mercurial/dirstate.py	Mon Feb 20 15:18:07 2023 +0100
@@ -205,6 +205,16 @@
 
     @contextlib.contextmanager
     @check_invalidated
+    def running_status(self, repo):
+        """Wrap a status operation
+
+        Currently does nothing, but exist to let other code adds it before we
+        start enforcing it.
+        """
+        yield
+
+    @contextlib.contextmanager
+    @check_invalidated
     def _changing(self, repo, change_type):
         if repo.currentwlock() is None:
             msg = b"trying to change the dirstate without holding the wlock"