# HG changeset patch # User Pierre-Yves David # Date 2014-03-28 21:37:28 # Node ID 1bb8ed6c000cc5f07cbded303eb9bfef84b72af9 # Parent acbfce12fafd9ed7148d3c0f504a33d405750563 wireproto: use decorator for the capabilities command diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -571,6 +571,7 @@ def _capabilities(repo, proto): # 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 @@ def unbundle(repo, proto, heads): os.unlink(tempname) commands.update({ - 'capabilities': (capabilities, ''), 'changegroup': (changegroup, 'roots'), 'changegroupsubset': (changegroupsubset, 'bases heads'), 'debugwireargs': (debugwireargs, 'one two *'),