[PATCH 09 of 22] wireproto: use decorator for the branches command
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Fri Mar 28 17:40:35 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042622 25200
# Fri Mar 28 14:37:02 2014 -0700
# Node ID a4903974ce75aba70c5ccda9515aa317229c9348
# Parent f4f4fc520af9c442da14ec0caa6ee83dba44e2c8
wireproto: use decorator for the branches command
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -529,10 +529,11 @@ def branchmap(repo, proto):
branchname = urllib.quote(encoding.fromlocal(branch))
branchnodes = encodelist(nodes)
heads.append('%s %s' % (branchname, branchnodes))
return '\n'.join(heads)
+ at wireprotocommand('branches', 'nodes')
def branches(repo, proto, nodes):
nodes = decodelist(nodes)
r = []
for b in repo.branches(nodes):
r.append(encodelist(b) + "\n")
@@ -782,11 +783,10 @@ def unbundle(repo, proto, heads):
finally:
fp.close()
os.unlink(tempname)
commands.update({
- 'branches': (branches, 'nodes'),
'capabilities': (capabilities, ''),
'changegroup': (changegroup, 'roots'),
'changegroupsubset': (changegroupsubset, 'bases heads'),
'debugwireargs': (debugwireargs, 'one two *'),
'getbundle': (getbundle, '*'),
More information about the Mercurial-devel
mailing list