wireproto: use decorator for the listkeys command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:42:21 -0700
changeset 20919 0bb1882c85b0
parent 20918 0971939f51aa
child 20920 7fac25eddcea
wireproto: use decorator for the listkeys command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:42:06 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:42:21 2014 -0700
@@ -621,6 +621,7 @@
     '''
     return "capabilities: %s\n" % (capabilities(repo, proto))
 
+@wireprotocommand('listkeys', 'namespace')
 def listkeys(repo, proto, namespace):
     d = repo.listkeys(encoding.tolocal(namespace)).items()
     t = '\n'.join(['%s\t%s' % (encoding.fromlocal(k), encoding.fromlocal(v))
@@ -793,7 +794,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'listkeys': (listkeys, 'namespace'),
     'lookup': (lookup, 'key'),
     'pushkey': (pushkey, 'namespace key old new'),
     'stream_out': (stream, ''),