[PATCH 14 of 22] wireproto: use decorator for the getbundle command

pierre-yves.david at ens-lyon.org pierre-yves.david at ens-lyon.org
Fri Mar 28 17:40:40 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042807 25200
#      Fri Mar 28 14:40:07 2014 -0700
# Node ID 91e1b2de14e589d51e92b0f1407057afe23bace7
# Parent  dcf5b711f859509ec34f1484e25d4ab33de6d2ce
wireproto: use decorator for the getbundle command

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -592,10 +592,11 @@ def changegroupsubset(repo, proto, bases
 def debugwireargs(repo, proto, one, two, others):
     # only accept optional args from the known set
     opts = options('debugwireargs', ['three', 'four'], others)
     return repo.debugwireargs(one, two, **opts)
 
+ at wireprotocommand('getbundle', '*')
 def getbundle(repo, proto, others):
     opts = options('getbundle', ['heads', 'common', 'bundlecaps'], others)
     for k, v in opts.iteritems():
         if k in ('heads', 'common'):
             opts[k] = decodelist(v)
@@ -787,11 +788,10 @@ def unbundle(repo, proto, heads):
     finally:
         fp.close()
         os.unlink(tempname)
 
 commands.update({
-    'getbundle': (getbundle, '*'),
     'heads': (heads, ''),
     'hello': (hello, ''),
     'known': (known, 'nodes *'),
     'listkeys': (listkeys, 'namespace'),
     'lookup': (lookup, 'key'),


More information about the Mercurial-devel mailing list