changeset 20920:7fac25eddcea

wireproto: use decorator for the lookup command
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 28 Mar 2014 14:42:38 -0700
parents 0bb1882c85b0
children 70ed3174ce69
files mercurial/wireproto.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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'),