Mercurial > hg-stable
changeset 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 | 99835097bca9 |
children | 144280f1578f |
files | mercurial/sshserver.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/sshserver.py Fri Jun 09 09:14:52 2006 -0700 +++ b/mercurial/sshserver.py Fri Jun 09 17:47:38 2006 -0500 @@ -51,6 +51,18 @@ 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("")