changeset 20923:d771641b7051

wireproto: use decorator for the ubundle command
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 28 Mar 2014 14:43:30 -0700
parents 588e24f3eea3
children e10000369b47
files mercurial/wireproto.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Fri Mar 28 14:43:11 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:43:30 2014 -0700
@@ -750,6 +750,7 @@
 
     return streamres(streamer(repo, entries, total_bytes))
 
+@wireprotocommand('unbundle', 'heads')
 def unbundle(repo, proto, heads):
     their_heads = decodelist(heads)
 
@@ -795,7 +796,3 @@
     finally:
         fp.close()
         os.unlink(tempname)
-
-commands.update({
-    'unbundle': (unbundle, 'heads'),
-})