comparison mercurial/sshserver.py @ 2419:b17eebc911ae

Initial implementation of hello command for ssh
author Matt Mackall <mpm@selenic.com>
date Fri, 09 Jun 2006 17:47:38 -0500
parents cc90dcbdf053
children e8c4f3d3df8c
comparison
equal deleted inserted replaced
2418:99835097bca9 2419:b17eebc911ae
49 49
50 def do_heads(self): 50 def do_heads(self):
51 h = self.repo.heads() 51 h = self.repo.heads()
52 self.respond(" ".join(map(hex, h)) + "\n") 52 self.respond(" ".join(map(hex, h)) + "\n")
53 53
54 def do_hello(self):
55 '''the hello command returns a set of lines describing various
56 interesting things about the server, in an RFC822-like format.
57 Currently the only one defined is "capabilities", which
58 consists of a line in the form:
59
60 capabilities: space separated list of tokens
61 '''
62
63 r = "capabilities:\n"
64 self.respond(r)
65
54 def do_lock(self): 66 def do_lock(self):
55 self.lock = self.repo.lock() 67 self.lock = self.repo.lock()
56 self.respond("") 68 self.respond("")
57 69
58 def do_unlock(self): 70 def do_unlock(self):