Comments
Patch
@@ -5,13 +5,24 @@
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import copy
+import phases
+
+def computeunserved(repo):
+ """compute the set of revision that should be filtered when used a server
+
+ Secret and hidden changeset should not pretend to be here."""
+ assert not repo.changelog.filteredrevs
+ # fast path in simple case to avoid impact of non optimised code
+ if phases.hassecret(repo) or repo.obsstore:
+ return frozenset(repo.revs('hidden() + secret()'))
+ return ()
# function to compute filtered set
-computefiltered = {}
+computefiltered = {'unserved': computeunserved}
def filteredrevs(repo, filtername):
"""returns set of filtered revision for this filter name"""
if filtername not in repo.revsfiltercache:
func = computefiltered[filtername]