changeset 37650:62ebfda864de

repository: remove ipeercommands from ipeerbase AFAICT all callers in core have moved to the commandexecutor interface for invoking wire protocol commands. Or at least they aren't using the named methods on ipeercommands to invoke them. This means we can drop ipeercommands from the ipeerbase interface. As far as interface based programming goes, it is now illegal to call an ipeercommands method for issuing wire protocol commands. However, the methods are still there, so they will still work. At some point we will want to break that API... Differential Revision: https://phab.mercurial-scm.org/D3318
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 13 Apr 2018 11:54:13 -0700
parents a168799687e5
children 950294e28136
files mercurial/localrepo.py mercurial/repository.py mercurial/wireprotov1peer.py
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Apr 13 12:13:42 2018 -0700
+++ b/mercurial/localrepo.py	Fri Apr 13 11:54:13 2018 -0700
@@ -196,6 +196,7 @@
     def close(self):
         self._closed = True
 
+@zi.implementer(repository.ipeercommands)
 class localpeer(repository.peer):
     '''peer for a local repo; reflects only the most recent API'''
 
--- a/mercurial/repository.py	Fri Apr 13 12:13:42 2018 -0700
+++ b/mercurial/repository.py	Fri Apr 13 11:54:13 2018 -0700
@@ -284,8 +284,7 @@
         being issued.
         """
 
-class ipeerbase(ipeerconnection, ipeercapabilities, ipeercommands,
-                ipeerrequests):
+class ipeerbase(ipeerconnection, ipeercapabilities, ipeerrequests):
     """Unified interface for peer repositories.
 
     All peer instances must conform to this interface.
--- a/mercurial/wireprotov1peer.py	Fri Apr 13 12:13:42 2018 -0700
+++ b/mercurial/wireprotov1peer.py	Fri Apr 13 11:54:13 2018 -0700
@@ -308,7 +308,7 @@
             else:
                 f.set_result(result)
 
-@zi.implementer(repository.ipeerlegacycommands)
+@zi.implementer(repository.ipeercommands, repository.ipeerlegacycommands)
 class wirepeer(repository.peer):
     """Client-side interface for communicating with a peer repository.