[PATCH 07 of 22] wireproto: use decorator for the between command
pierre-yves.david at ens-lyon.org
pierre-yves.david at ens-lyon.org
Fri Mar 28 22:40:33 UTC 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1396042565 25200
# Fri Mar 28 14:36:05 2014 -0700
# Node ID e3e6a368d5b798f13022aea6442b3fe9fcf4f304
# Parent a88cf7b4766aa9054f94a9277fc7f29157c3ae4b
wireproto: use decorator for the between command
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -511,10 +511,11 @@ def batch(repo, proto, cmds, others):
if isinstance(result, ooberror):
return result
res.append(escapearg(result))
return ';'.join(res)
+ at wireprotocommand('between', 'pairs')
def between(repo, proto, pairs):
pairs = [decodelist(p, '-') for p in pairs.split(" ")]
r = []
for b in repo.between(pairs):
r.append(encodelist(b) + "\n")
@@ -780,11 +781,10 @@ def unbundle(repo, proto, heads):
finally:
fp.close()
os.unlink(tempname)
commands.update({
- 'between': (between, 'pairs'),
'branchmap': (branchmap, ''),
'branches': (branches, 'nodes'),
'capabilities': (capabilities, ''),
'changegroup': (changegroup, 'roots'),
'changegroupsubset': (changegroupsubset, 'bases heads'),
More information about the Mercurial-devel
mailing list