[PATCH 3 of 7 Series-C] clfilter: filter "unserved" on all wireprotocol commands call
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Mon Jan 7 12:16:06 CST 2013
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1357443453 -3600
# Node ID 3d3f81458983d5d8d577ad0b17840ec952f609b3
# Parent 0435d26ab186b93e4b20e03587a9718ca452e980
clfilter: filter "unserved" on all wireprotocol commands call
This ensure that no unserved changeset are exposed through wire protocol.
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -344,10 +344,11 @@ class pusherr(object):
class ooberror(object):
def __init__(self, message):
self.message = message
def dispatch(repo, proto, command):
+ repo = repo.filtered("unserved")
func, spec = commands[command]
args = proto.getargs(spec)
return func(repo, proto, *args)
def options(cmd, keys, others):
@@ -360,10 +361,11 @@ def options(cmd, keys, others):
sys.stderr.write("abort: %s got unexpected arguments %s\n"
% (cmd, ",".join(others)))
return opts
def batch(repo, proto, cmds, others):
+ repo = repo.filtered("unserved")
res = []
for pair in cmds.split(';'):
op, args = pair.split(' ', 1)
vals = {}
for a in args.split(','):
More information about the Mercurial-devel
mailing list