[PATCH 13 of 16] repoview: add a subset table

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jan 1 19:09:35 CST 2013


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1357087300 -3600
# Node ID 14356b521782ade4cd3c258d36a909217b290133
# Parent  b137101ab3599fd9e0fc7cff7e73bbb14db592b0
repoview: add a subset table

This will be used by branchmap collaboration. See inline documentation for more
details

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -17,12 +17,19 @@ def computeunserved(repo):
     # 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 frozenset()
 
-# function to compute filtered set
+# Function to compute filtered set
 filtertable = {'unserved': computeunserved}
+### Nearest subset relation
+# Nearest subset of filter X is a filter Y so that:
+# * Y is included in X,
+# * X - Y is as small as possible.
+# This create and ordering used for branchmap purpose.
+# the ordering may be partial
+subsettable = {None: 'unserved'}
 
 def filteredrevs(repo, filtername):
     """returns set of filtered revision for this filter name"""
     if filtername not in repo.filteredrevcache:
         func = filtertable[filtername]


More information about the Mercurial-devel mailing list