changeset 20917:5ad151f8a3fa

wireproto: use decorator for the hello command
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 28 Mar 2014 14:40:44 -0700
parents 31eacf182f80
children 0971939f51aa
files mercurial/wireproto.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Fri Mar 28 14:40:31 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:40:44 2014 -0700
@@ -610,6 +610,7 @@
     h = repo.heads()
     return encodelist(h) + "\n"
 
+@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.
@@ -791,7 +792,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'hello': (hello, ''),
     'known': (known, 'nodes *'),
     'listkeys': (listkeys, 'namespace'),
     'lookup': (lookup, 'key'),