wireproto: use decorator for the capabilities command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:37:28 -0700
changeset 20911 1bb8ed6c000c
parent 20910 acbfce12fafd
child 20912 96ecb77f971d
wireproto: use decorator for the capabilities command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:37:02 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:37:28 2014 -0700
@@ -571,6 +571,7 @@
 
 # If you are writting and extension and consider wrapping this function. Wrap
 # `_capabilities` instead.
+@wireprotocommand('capabilities')
 def capabilities(repo, proto):
     return ' '.join(_capabilities(repo, proto))
 
@@ -785,7 +786,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'capabilities': (capabilities, ''),
     'changegroup': (changegroup, 'roots'),
     'changegroupsubset': (changegroupsubset, 'bases heads'),
     'debugwireargs': (debugwireargs, 'one two *'),