Show More
@@ -386,7 +386,7 b' def perfbranchmap(ui, repo, full=False):' | |||||
386 | allfilters = [] |
|
386 | allfilters = [] | |
387 | while possiblefilters: |
|
387 | while possiblefilters: | |
388 | for name in possiblefilters: |
|
388 | for name in possiblefilters: | |
389 |
subset = |
|
389 | subset = branchmap.subsettable.get(name) | |
390 | if subset not in possiblefilters: |
|
390 | if subset not in possiblefilters: | |
391 | break |
|
391 | break | |
392 | else: |
|
392 | else: |
@@ -7,7 +7,7 b'' | |||||
7 |
|
7 | |||
8 | from node import bin, hex, nullid, nullrev |
|
8 | from node import bin, hex, nullid, nullrev | |
9 | import encoding |
|
9 | import encoding | |
10 |
import util |
|
10 | import util | |
11 |
|
11 | |||
12 | def _filename(repo): |
|
12 | def _filename(repo): | |
13 | """name of a branchcache file for a given repo or repoview""" |
|
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 | def updatecache(repo): |
|
72 | def updatecache(repo): | |
62 | cl = repo.changelog |
|
73 | cl = repo.changelog | |
63 | filtername = repo.filtername |
|
74 | filtername = repo.filtername | |
@@ -67,7 +78,7 b' def updatecache(repo):' | |||||
67 | if partial is None or not partial.validfor(repo): |
|
78 | if partial is None or not partial.validfor(repo): | |
68 | partial = read(repo) |
|
79 | partial = read(repo) | |
69 | if partial is None: |
|
80 | if partial is None: | |
70 |
subsetname = |
|
81 | subsetname = subsettable.get(filtername) | |
71 | if subsetname is None: |
|
82 | if subsetname is None: | |
72 | partial = branchcache() |
|
83 | partial = branchcache() | |
73 | else: |
|
84 | else: |
@@ -98,16 +98,6 b" filtertable = {'visible': computehidden," | |||||
98 | 'served': computeunserved, |
|
98 | 'served': computeunserved, | |
99 | 'immutable': computemutable, |
|
99 | 'immutable': computemutable, | |
100 | 'base': computeimpactable} |
|
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 | def filterrevs(repo, filtername): |
|
102 | def filterrevs(repo, filtername): | |
113 | """returns set of filtered revision for this filter name""" |
|
103 | """returns set of filtered revision for this filter name""" | |
@@ -215,4 +205,3 b' class repoview(object):' | |||||
215 | @property |
|
205 | @property | |
216 | def requirements(self): |
|
206 | def requirements(self): | |
217 | return self._unfilteredrepo.requirements |
|
207 | return self._unfilteredrepo.requirements | |
218 |
|
General Comments 0
You need to be logged in to leave comments.
Login now