diff mercurial/interfaces/repository.py @ 52525:e123c8a26a70

localrepo: subclass the new `repository.ipeercommandexecutor` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. See 4ef6dbc27a99 for the benefits of explicit subclassing. Since we're direct subclassing here and there are only a few methods on this interface, also make them abstract like was done in ef119f914fc1.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 24 Oct 2024 20:26:25 -0400
parents 3913f9509476
children 61f70a6ab645
line wrap: on
line diff
--- a/mercurial/interfaces/repository.py	Wed Oct 23 15:58:32 2024 -0400
+++ b/mercurial/interfaces/repository.py	Thu Oct 24 20:26:25 2024 -0400
@@ -344,6 +344,7 @@
     outstanding requests are waited on.
     """
 
+    @abc.abstractmethod
     def callcommand(self, name, args):
         """Request that a named command be executed.
 
@@ -366,6 +367,7 @@
         until all command requests have been issued.
         """
 
+    @abc.abstractmethod
     def sendcommands(self):
         """Trigger submission of queued command requests.
 
@@ -376,6 +378,7 @@
         When called, no more new commands may be issued with this executor.
         """
 
+    @abc.abstractmethod
     def close(self):
         """Signal that this command request is finished.