Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/wireproto.py @ 36259: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 | 2f7290555c96 |
children | 2e07dc514073 |
comparison
equal
deleted
inserted
replaced
36258:874209855f5c | 36259:62bca1c50e96 |
---|---|
899 h = repo.heads() | 899 h = repo.heads() |
900 return bytesresponse(encodelist(h) + '\n') | 900 return bytesresponse(encodelist(h) + '\n') |
901 | 901 |
902 @wireprotocommand('hello') | 902 @wireprotocommand('hello') |
903 def hello(repo, proto): | 903 def hello(repo, proto): |
904 '''the hello command returns a set of lines describing various | 904 """Called as part of SSH handshake to obtain server info. |
905 interesting things about the server, in an RFC822-like format. | 905 |
906 Currently the only one defined is "capabilities", which | 906 Returns a list of lines describing interesting things about the |
907 consists of a line in the form: | 907 server, in an RFC822-like format. |
908 | 908 |
909 capabilities: space separated list of tokens | 909 Currently, the only one defined is ``capabilities``, which consists of a |
910 ''' | 910 line of space separated tokens describing server abilities: |
911 | |
912 capabilities: <token0> <token1> <token2> | |
913 """ | |
911 caps = capabilities(repo, proto).data | 914 caps = capabilities(repo, proto).data |
912 return bytesresponse('capabilities: %s\n' % caps) | 915 return bytesresponse('capabilities: %s\n' % caps) |
913 | 916 |
914 @wireprotocommand('listkeys', 'namespace') | 917 @wireprotocommand('listkeys', 'namespace') |
915 def listkeys(repo, proto, namespace): | 918 def listkeys(repo, proto, namespace): |