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