# HG changeset patch # User Pierre-Yves David # Date 2014-03-28 21:42:55 # Node ID 70ed3174ce6910c769806c9de39d280d04f19c05 # Parent 7fac25eddceab415c53081305a48484b089faa94 wireproto: use decorator for the pushkey command diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -644,6 +644,7 @@ def lookup(repo, proto, key): def known(repo, proto, nodes, others): return ''.join(b and "1" or "0" for b in repo.known(decodelist(nodes))) +@wireprotocommand('pushkey', 'namespace key old new') def pushkey(repo, proto, namespace, key, old, new): # compatibility with pre-1.8 clients which were accidentally # sending raw binary nodes rather than utf-8-encoded hex @@ -795,7 +796,6 @@ def unbundle(repo, proto, heads): os.unlink(tempname) commands.update({ - 'pushkey': (pushkey, 'namespace key old new'), 'stream_out': (stream, ''), 'unbundle': (unbundle, 'heads'), })