Patchwork [13,of,22] wireproto: use decorator for the debugwireargs command

login
register
mail settings
Submitter Pierre-Yves David
Date March 28, 2014, 10:40 p.m.
Message ID <dcf5b711f859509ec34f.1396046439@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4133/
State Accepted
Commit d81b518a18624e0da3e94b681b64f806177b0a47
Headers show

Comments

Pierre-Yves David - March 28, 2014, 10:40 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1396042746 25200
#      Fri Mar 28 14:39:06 2014 -0700
# Node ID dcf5b711f859509ec34f1484e25d4ab33de6d2ce
# Parent  0d9f6635d9ee9915ee588a15587bf5739e19d150
wireproto: use decorator for the debugwireargs command

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -586,10 +586,11 @@  def changegroupsubset(repo, proto, bases
     bases = decodelist(bases)
     heads = decodelist(heads)
     cg = repo.changegroupsubset(bases, heads, 'serve')
     return streamres(proto.groupchunks(cg))
 
+@wireprotocommand('debugwireargs', 'one two *')
 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)
 
@@ -786,11 +787,10 @@  def unbundle(repo, proto, heads):
     finally:
         fp.close()
         os.unlink(tempname)
 
 commands.update({
-    'debugwireargs': (debugwireargs, 'one two *'),
     'getbundle': (getbundle, '*'),
     'heads': (heads, ''),
     'hello': (hello, ''),
     'known': (known, 'nodes *'),
     'listkeys': (listkeys, 'namespace'),