changeset 35988:04231e893a12

wireprotoserver: rename abstractserverproto and improve docstring The docstring isn't completely accurate for the current state of the world. But it does describe the direction future patches will be taking things. Differential Revision: https://phab.mercurial-scm.org/D2065
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 01 Feb 2018 08:54:48 -0800
parents 6010fe1da619
children c64b9adfb371
files mercurial/wireprotoserver.py
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py	Thu Feb 01 16:11:54 2018 -0800
+++ b/mercurial/wireprotoserver.py	Thu Feb 01 08:54:48 2018 -0800
@@ -38,10 +38,13 @@
 # to reflect BC breakages.
 SSHV2 = 'exp-ssh-v2-0001'
 
-class abstractserverproto(object):
-    """abstract class that summarizes the protocol API
+class baseprotocolhandler(object):
+    """Abstract base class for wire protocol handlers.
 
-    Used as reference and documentation.
+    A wire protocol handler serves as an interface between protocol command
+    handlers and the wire protocol transport layer. Protocol handlers provide
+    methods to read command arguments, redirect stdio for the duration of
+    the request, handle response types, etc.
     """
 
     __metaclass__ = abc.ABCMeta
@@ -104,7 +107,7 @@
 
     return ''.join(chunks)
 
-class webproto(abstractserverproto):
+class webproto(baseprotocolhandler):
     def __init__(self, req, ui):
         self._req = req
         self._ui = ui
@@ -333,7 +336,7 @@
 
     return ''
 
-class sshserver(abstractserverproto):
+class sshserver(baseprotocolhandler):
     def __init__(self, ui, repo):
         self._ui = ui
         self._repo = repo