[PATCH 15 of 22] wireproto: use decorator for the heads command
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Fri Mar 28 17:40:41 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042831 25200
# Fri Mar 28 14:40:31 2014 -0700
# Node ID ddae81fd0a0eb8c0663eeb5e028cf45192cc076c
# Parent 91e1b2de14e589d51e92b0f1407057afe23bace7
wireproto: use decorator for the heads command
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -603,10 +603,11 @@ def getbundle(repo, proto, others):
elif k == 'bundlecaps':
opts[k] = set(v.split(','))
cg = repo.getbundle('serve', **opts)
return streamres(proto.groupchunks(cg))
+ at wireprotocommand('heads')
def heads(repo, proto):
h = repo.heads()
return encodelist(h) + "\n"
def hello(repo, proto):
@@ -788,11 +789,10 @@ def unbundle(repo, proto, heads):
finally:
fp.close()
os.unlink(tempname)
commands.update({
- 'heads': (heads, ''),
'hello': (hello, ''),
'known': (known, 'nodes *'),
'listkeys': (listkeys, 'namespace'),
'lookup': (lookup, 'key'),
'pushkey': (pushkey, 'namespace key old new'),
More information about the Mercurial-devel
mailing list