wireproto: use decorator for the known command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:42:06 -0700
changeset 20918 0971939f51aa
parent 20917 5ad151f8a3fa
child 20919 0bb1882c85b0
wireproto: use decorator for the known command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:40:44 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:42:06 2014 -0700
@@ -638,6 +638,7 @@
         success = 0
     return "%s %s\n" % (success, r)
 
+@wireprotocommand('known', 'nodes *')
 def known(repo, proto, nodes, others):
     return ''.join(b and "1" or "0" for b in repo.known(decodelist(nodes)))
 
@@ -792,7 +793,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'known': (known, 'nodes *'),
     'listkeys': (listkeys, 'namespace'),
     'lookup': (lookup, 'key'),
     'pushkey': (pushkey, 'namespace key old new'),