diff mercurial/httppeer.py @ 37320:39f7d4ee8bcd

repository: port peer interfaces to zope.interface zope.interface is superior. Let's switch to it. Unlike abc, which defines interfaces through a base class, zope.interface uses different types for interfaces and for implementations. So, we had to invent some new types to hold the interfaces in order to separate the interface from its default implementation. The names here could probably be better. I've been wanting to overhaul the peer interface for a while. And wire protocol version 2 will force that work. So anticipate a refactoring of these interfaces in later commits. With this commit, we no longer test abc interfaces in test-check-interfaces.py, so code for that has been removed. Differential Revision: https://phab.mercurial-scm.org/D3068 # no-check-commit because of stream_out()
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 30 Mar 2018 18:53:17 -0700
parents 8e89c2bec1f7
children e826fe7a08c7
line wrap: on
line diff
--- a/mercurial/httppeer.py	Fri Mar 30 14:52:32 2018 -0700
+++ b/mercurial/httppeer.py	Fri Mar 30 18:53:17 2018 -0700
@@ -184,7 +184,7 @@
                 % (util.timer() - start, ret.code))
         return ret
 
-    # Begin of _basepeer interface.
+    # Begin of ipeerconnection interface.
 
     @util.propertycache
     def ui(self):
@@ -205,9 +205,9 @@
     def close(self):
         pass
 
-    # End of _basepeer interface.
+    # End of ipeerconnection interface.
 
-    # Begin of _basewirepeer interface.
+    # Begin of ipeercommands interface.
 
     def capabilities(self):
         # self._fetchcaps() should have been called as part of peer
@@ -215,7 +215,7 @@
         assert self._caps is not None
         return self._caps
 
-    # End of _basewirepeer interface.
+    # End of ipeercommands interface.
 
     # look up capabilities only when needed