clfilter: filter "unserved" on all wireprotocol command calls
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sun, 06 Jan 2013 04:37:33 +0100
changeset 18280 47abbaabaaa5
parent 18279 679767c38cb5
child 18281 898c575833c9
clfilter: filter "unserved" on all wireprotocol command calls This ensures that unserved changesets are not exposed through the wire protocol.
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Sun Jan 06 04:28:52 2013 +0100
+++ b/mercurial/wireproto.py	Sun Jan 06 04:37:33 2013 +0100
@@ -346,6 +346,7 @@
         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)
@@ -362,6 +363,7 @@
     return opts
 
 def batch(repo, proto, cmds, others):
+    repo = repo.filtered("unserved")
     res = []
     for pair in cmds.split(';'):
         op, args = pair.split(' ', 1)