wireproto: use decorator for the hello command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:40:44 -0700
changeset 20917 5ad151f8a3fa
parent 20916 31eacf182f80
child 20918 0971939f51aa
wireproto: use decorator for the hello command
mercurial/wireproto.py
--- 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'),