diff mercurial/wireprototypes.py @ 37393:afcfdf53e4b5

wireproto: provide accessors for client capabilities For HTTP, this refactors the existing logic, including the parsing of the compression engine capability. For SSH, this adds a ssh-only capability "protocaps" and a command for informing the server on what the client supports. Since SSH is stateful, keep track of the capabilities in the server instance. Differential Revision: https://phab.mercurial-scm.org/D1944
author Joerg Sonnenberger <joerg@bec.de>
date Sat, 24 Mar 2018 17:57:22 +0100
parents 78103e4138b1
children 2d965bfeb8f6
line wrap: on
line diff
--- a/mercurial/wireprototypes.py	Thu Apr 05 17:51:10 2018 +0200
+++ b/mercurial/wireprototypes.py	Sat Mar 24 17:57:22 2018 +0100
@@ -117,6 +117,12 @@
 
         returns a list of values (same order as <args>)"""
 
+    def getprotocaps():
+        """Returns the list of protocol-level capabilities of client
+
+        Returns a list of capabilities as declared by the client for
+        the current request (or connection for stateful protocol handlers)."""
+
     def forwardpayload(fp):
         """Read the raw payload and forward to a file.