mercurial/wireproto.py
changeset 36221 62bca1c50e96
parent 36074 2f7290555c96
child 36223 2e07dc514073
equal deleted inserted replaced
36220:874209855f5c 36221: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):