[PATCH 06 of 22] wireproto: use decorator for the batch command
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Fri Mar 28 17:40:32 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042536 25200
# Fri Mar 28 14:35:36 2014 -0700
# Node ID a88cf7b4766aa9054f94a9277fc7f29157c3ae4b
# Parent b543d97beb42db45c2952031a87e6c4f75f2b820
wireproto: use decorator for the batch command
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -479,10 +479,11 @@ def wireprotocommand(name, args=''):
def register(func):
commands[name] = (func, args)
return func
return register
+ at wireprotocommand('batch', 'cmds *')
def batch(repo, proto, cmds, others):
repo = repo.filtered("served")
res = []
for pair in cmds.split(';'):
op, args = pair.split(' ', 1)
@@ -779,11 +780,10 @@ def unbundle(repo, proto, heads):
finally:
fp.close()
os.unlink(tempname)
commands.update({
- 'batch': (batch, 'cmds *'),
'between': (between, 'pairs'),
'branchmap': (branchmap, ''),
'branches': (branches, 'nodes'),
'capabilities': (capabilities, ''),
'changegroup': (changegroup, 'roots'),
More information about the Mercurial-devel
mailing list