changeset 36221:62bca1c50e96

wireproto: improve docstring for "hello" Differential Revision: https://phab.mercurial-scm.org/D2217
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 12 Feb 2018 17:16:52 -0800
parents 874209855f5c
children 6ba5b03f3645
files mercurial/wireproto.py
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Mon Feb 12 17:14:29 2018 -0800
+++ b/mercurial/wireproto.py	Mon Feb 12 17:16:52 2018 -0800
@@ -901,13 +901,16 @@
 
 @wireprotocommand('hello')
 def hello(repo, proto):
-    '''the hello command returns a set of lines describing various
-    interesting things about the server, in an RFC822-like format.
-    Currently the only one defined is "capabilities", which
-    consists of a line in the form:
+    """Called as part of SSH handshake to obtain server info.
+
+    Returns a list of lines describing interesting things about the
+    server, in an RFC822-like format.
 
-    capabilities: space separated list of tokens
-    '''
+    Currently, the only one defined is ``capabilities``, which consists of a
+    line of space separated tokens describing server abilities:
+
+        capabilities: <token0> <token1> <token2>
+    """
     caps = capabilities(repo, proto).data
     return bytesresponse('capabilities: %s\n' % caps)