[PATCH 16 of 22] wireproto: use decorator for the hello command
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Fri Mar 28 22:40:42 UTC 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042844 25200
# Fri Mar 28 14:40:44 2014 -0700
# Node ID c827c7138b90afc234ddf56d318354d5bf0f30d6
# Parent ddae81fd0a0eb8c0663eeb5e028cf45192cc076c
wireproto: use decorator for the hello command
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -608,10 +608,11 @@ def getbundle(repo, proto, others):
@wireprotocommand('heads')
def heads(repo, proto):
h = repo.heads()
return encodelist(h) + "\n"
+ at wireprotocommand('hello')
def hello(repo, proto):
'''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:
@@ -789,11 +790,10 @@ def unbundle(repo, proto, heads):
finally:
fp.close()
os.unlink(tempname)
commands.update({
- 'hello': (hello, ''),
'known': (known, 'nodes *'),
'listkeys': (listkeys, 'namespace'),
'lookup': (lookup, 'key'),
'pushkey': (pushkey, 'namespace key old new'),
'stream_out': (stream, ''),
More information about the Mercurial-devel
mailing list