wireproto: use decorator for the lookup command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:42:38 -0700
changeset 20920 7fac25eddcea
parent 20919 0bb1882c85b0
child 20921 70ed3174ce69
wireproto: use decorator for the lookup command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:42:21 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:42:38 2014 -0700
@@ -628,6 +628,7 @@
                    for k, v in d])
     return t
 
+@wireprotocommand('lookup', 'key')
 def lookup(repo, proto, key):
     try:
         k = encoding.tolocal(key)
@@ -794,7 +795,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'lookup': (lookup, 'key'),
     'pushkey': (pushkey, 'namespace key old new'),
     'stream_out': (stream, ''),
     'unbundle': (unbundle, 'heads'),