[PATCH 11 of 22] wireproto: use decorator for the changegroup command

pierre-yves.david at ens-lyon.org pierre-yves.david at ens-lyon.org
Fri Mar 28 22:40:37 UTC 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042699 25200
#      Fri Mar 28 14:38:19 2014 -0700
# Node ID 50f44cb30163f10a9c44254cead1a70152d7d77a
# Parent  d7736d49a67b8c8d2fe91e5930f17befc76742c1
wireproto: use decorator for the changegroup command

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -573,10 +573,11 @@ def _capabilities(repo, proto):
 # `_capabilities` instead.
 @wireprotocommand('capabilities')
 def capabilities(repo, proto):
     return ' '.join(_capabilities(repo, proto))
 
+ at wireprotocommand('changegroup', 'roots')
 def changegroup(repo, proto, roots):
     nodes = decodelist(roots)
     cg = repo.changegroup(nodes, 'serve')
     return streamres(proto.groupchunks(cg))
 
@@ -784,11 +785,10 @@ def unbundle(repo, proto, heads):
     finally:
         fp.close()
         os.unlink(tempname)
 
 commands.update({
-    'changegroup': (changegroup, 'roots'),
     'changegroupsubset': (changegroupsubset, 'bases heads'),
     'debugwireargs': (debugwireargs, 'one two *'),
     'getbundle': (getbundle, '*'),
     'heads': (heads, ''),
     'hello': (hello, ''),



More information about the Mercurial-devel mailing list