mercurial/branchmap.py
changeset 20032 175c6fd8cacc
parent 19839 a32ef044b99a
child 20181 b9515fb9e72a
--- a/mercurial/branchmap.py	Sat Nov 16 20:12:02 2013 -0500
+++ b/mercurial/branchmap.py	Wed Nov 06 14:38:34 2013 -0500
@@ -7,7 +7,7 @@
 
 from node import bin, hex, nullid, nullrev
 import encoding
-import util, repoview
+import util
 
 def _filename(repo):
     """name of a branchcache file for a given repo or repoview"""
@@ -58,6 +58,17 @@
 
 
 
+### 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: 'visible',
+               'visible': 'served',
+               'served': 'immutable',
+               'immutable': 'base'}
+
 def updatecache(repo):
     cl = repo.changelog
     filtername = repo.filtername
@@ -67,7 +78,7 @@
     if partial is None or not partial.validfor(repo):
         partial = read(repo)
         if partial is None:
-            subsetname = repoview.subsettable.get(filtername)
+            subsetname = subsettable.get(filtername)
             if subsetname is None:
                 partial = branchcache()
             else: