From patchwork Fri Mar 28 22:40:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [07,of,22] wireproto: use decorator for the between command From: Pierre-Yves David X-Patchwork-Id: 4127 Message-Id: To: mercurial-devel@selenic.com Cc: pierre-yves.david@ens-lyon.org Date: Fri, 28 Mar 2014 15:40:33 -0700 # HG changeset patch # User Pierre-Yves David # 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) +@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'),