wireproto: use decorator for the debugwireargs command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:39:06 -0700
changeset 20914 d81b518a1862
parent 20913 fc7219ec08bb
child 20915 6aae815f3e0d
wireproto: use decorator for the debugwireargs command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:38:40 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:39:06 2014 -0700
@@ -588,6 +588,7 @@
     cg = repo.changegroupsubset(bases, heads, 'serve')
     return streamres(proto.groupchunks(cg))
 
+@wireprotocommand('debugwireargs', 'one two *')
 def debugwireargs(repo, proto, one, two, others):
     # only accept optional args from the known set
     opts = options('debugwireargs', ['three', 'four'], others)
@@ -788,7 +789,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'debugwireargs': (debugwireargs, 'one two *'),
     'getbundle': (getbundle, '*'),
     'heads': (heads, ''),
     'hello': (hello, ''),