Patchwork [13,of,16] repoview: add a subset table

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 2, 2013, 1:09 a.m.
Message ID <14356b521782ade4cd3c.1357088975@yamac.lan>
Download mbox | patch
Permalink /patch/356/
State Superseded, archived
Commit 59a9f18d458788b5829a0c43b69c8118a62e4ddb
Headers show

Comments

Pierre-Yves David - Jan. 2, 2013, 1:09 a.m.
# 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

Patch

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]