# HG changeset patch # User Matt Mackall # Date 2006-06-09 22:47:38 # Node ID b17eebc911ae808e10487a567d94e1f05d70adf1 # Parent 99835097bca9a7543ce88fdb25b11bf74b5d23f1 Initial implementation of hello command for ssh diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py --- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -51,6 +51,18 @@ class sshserver(object): h = self.repo.heads() self.respond(" ".join(map(hex, h)) + "\n") + def do_hello(self): + '''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: + + capabilities: space separated list of tokens + ''' + + r = "capabilities:\n" + self.respond(r) + def do_lock(self): self.lock = self.repo.lock() self.respond("")