wireproto: use decorator for the changegroup command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:38:19 -0700
changeset 20912 96ecb77f971d
parent 20911 1bb8ed6c000c
child 20913 fc7219ec08bb
wireproto: use decorator for the changegroup command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:37:28 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:38:19 2014 -0700
@@ -575,6 +575,7 @@
 def capabilities(repo, proto):
     return ' '.join(_capabilities(repo, proto))
 
+@wireprotocommand('changegroup', 'roots')
 def changegroup(repo, proto, roots):
     nodes = decodelist(roots)
     cg = repo.changegroup(nodes, 'serve')
@@ -786,7 +787,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'changegroup': (changegroup, 'roots'),
     'changegroupsubset': (changegroupsubset, 'bases heads'),
     'debugwireargs': (debugwireargs, 'one two *'),
     'getbundle': (getbundle, '*'),