diff mercurial/sshpeer.py @ 33827:dedab036215d

wireproto: use new peer interface The wirepeer class provides concrete implementations of peer interface methods for calling wire protocol commands. It makes sense for this class to inherit from the peer abstract base class. So we change that. Since httppeer and sshpeer have already been converted to the new interface, peerrepository is no longer adding any value. So it has been removed. httppeer and sshpeer have been updated to reflect the loss of peerrepository and the inheritance of the abstract base class in wirepeer. The code changes in wirepeer are reordering of methods to group by interface. Some Python code in tests was updated to reflect changed APIs. .. api:: peer.peerrepository has been removed. Use repository.peer abstract base class to represent a peer repository. Differential Revision: https://phab.mercurial-scm.org/D338
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 10 Aug 2017 20:58:28 -0700
parents 1f8460b55986
children c037fd655b47
line wrap: on
line diff
--- a/mercurial/sshpeer.py	Sun Aug 06 18:00:19 2017 -0700
+++ b/mercurial/sshpeer.py	Thu Aug 10 20:58:28 2017 -0700
@@ -13,7 +13,6 @@
 from . import (
     error,
     pycompat,
-    repository,
     util,
     wireproto,
 )
@@ -115,7 +114,7 @@
     def flush(self):
         return self._main.flush()
 
-class sshpeer(wireproto.wirepeer, repository.legacypeer):
+class sshpeer(wireproto.wirepeer):
     def __init__(self, ui, path, create=False):
         self._url = path
         self._ui = ui
@@ -151,9 +150,6 @@
 
         self._validaterepo(sshcmd, args, remotecmd)
 
-        # TODO remove this alias once peerrepository inheritance is removed.
-        self._capabilities = self.capabilities
-
     # Begin of _basepeer interface.
 
     @util.propertycache