wireproto: use decorator for the getbundle command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:40:07 -0700
changeset 20915 6aae815f3e0d
parent 20914 d81b518a1862
child 20916 31eacf182f80
wireproto: use decorator for the getbundle command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:39:06 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:40:07 2014 -0700
@@ -594,6 +594,7 @@
     opts = options('debugwireargs', ['three', 'four'], others)
     return repo.debugwireargs(one, two, **opts)
 
+@wireprotocommand('getbundle', '*')
 def getbundle(repo, proto, others):
     opts = options('getbundle', ['heads', 'common', 'bundlecaps'], others)
     for k, v in opts.iteritems():
@@ -789,7 +790,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'getbundle': (getbundle, '*'),
     'heads': (heads, ''),
     'hello': (hello, ''),
     'known': (known, 'nodes *'),