[PATCH 12 of 22] wireproto: use decorator for the changegroupsubset command
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Fri Mar 28 17:40:38 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042720 25200
# Fri Mar 28 14:38:40 2014 -0700
# Node ID 0d9f6635d9ee9915ee588a15587bf5739e19d150
# Parent 50f44cb30163f10a9c44254cead1a70152d7d77a
wireproto: use decorator for the changegroupsubset command
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -579,10 +579,11 @@ def capabilities(repo, proto):
def changegroup(repo, proto, roots):
nodes = decodelist(roots)
cg = repo.changegroup(nodes, 'serve')
return streamres(proto.groupchunks(cg))
+ at wireprotocommand('changegroupsubset', 'bases heads')
def changegroupsubset(repo, proto, bases, heads):
bases = decodelist(bases)
heads = decodelist(heads)
cg = repo.changegroupsubset(bases, heads, 'serve')
return streamres(proto.groupchunks(cg))
@@ -785,11 +786,10 @@ def unbundle(repo, proto, heads):
finally:
fp.close()
os.unlink(tempname)
commands.update({
- 'changegroupsubset': (changegroupsubset, 'bases heads'),
'debugwireargs': (debugwireargs, 'one two *'),
'getbundle': (getbundle, '*'),
'heads': (heads, ''),
'hello': (hello, ''),
'known': (known, 'nodes *'),
More information about the Mercurial-devel
mailing list