##// END OF EJS Templates
subsettable: move from repoview to branchmap, the only place it's used...
Augie Fackler -
r20032:175c6fd8 default
parent child Browse files
Show More
@@ -386,7 +386,7 b' def perfbranchmap(ui, repo, full=False):'
386 386 allfilters = []
387 387 while possiblefilters:
388 388 for name in possiblefilters:
389 subset = repoview.subsettable.get(name)
389 subset = branchmap.subsettable.get(name)
390 390 if subset not in possiblefilters:
391 391 break
392 392 else:
@@ -7,7 +7,7 b''
7 7
8 8 from node import bin, hex, nullid, nullrev
9 9 import encoding
10 import util, repoview
10 import util
11 11
12 12 def _filename(repo):
13 13 """name of a branchcache file for a given repo or repoview"""
@@ -58,6 +58,17 b' def read(repo):'
58 58
59 59
60 60
61 ### Nearest subset relation
62 # Nearest subset of filter X is a filter Y so that:
63 # * Y is included in X,
64 # * X - Y is as small as possible.
65 # This create and ordering used for branchmap purpose.
66 # the ordering may be partial
67 subsettable = {None: 'visible',
68 'visible': 'served',
69 'served': 'immutable',
70 'immutable': 'base'}
71
61 72 def updatecache(repo):
62 73 cl = repo.changelog
63 74 filtername = repo.filtername
@@ -67,7 +78,7 b' def updatecache(repo):'
67 78 if partial is None or not partial.validfor(repo):
68 79 partial = read(repo)
69 80 if partial is None:
70 subsetname = repoview.subsettable.get(filtername)
81 subsetname = subsettable.get(filtername)
71 82 if subsetname is None:
72 83 partial = branchcache()
73 84 else:
@@ -98,16 +98,6 b" filtertable = {'visible': computehidden,"
98 98 'served': computeunserved,
99 99 'immutable': computemutable,
100 100 'base': computeimpactable}
101 ### Nearest subset relation
102 # Nearest subset of filter X is a filter Y so that:
103 # * Y is included in X,
104 # * X - Y is as small as possible.
105 # This create and ordering used for branchmap purpose.
106 # the ordering may be partial
107 subsettable = {None: 'visible',
108 'visible': 'served',
109 'served': 'immutable',
110 'immutable': 'base'}
111 101
112 102 def filterrevs(repo, filtername):
113 103 """returns set of filtered revision for this filter name"""
@@ -215,4 +205,3 b' class repoview(object):'
215 205 @property
216 206 def requirements(self):
217 207 return self._unfilteredrepo.requirements
218
General Comments 0
You need to be logged in to leave comments. Login now