wireproto: use decorator for the batch command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:35:36 -0700
changeset 20907 aedec880e095
parent 20906 7a634b34fc91
child 20908 ae4bf69c8068
wireproto: use decorator for the batch command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:30:11 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:35:36 2014 -0700
@@ -481,6 +481,7 @@
         return func
     return register
 
+@wireprotocommand('batch', 'cmds *')
 def batch(repo, proto, cmds, others):
     repo = repo.filtered("served")
     res = []
@@ -781,7 +782,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'batch': (batch, 'cmds *'),
     'between': (between, 'pairs'),
     'branchmap': (branchmap, ''),
     'branches': (branches, 'nodes'),