Show More
@@ -40,6 +40,7 b' unpack_from = struct.unpack_from' | |||
|
40 | 40 | subsettable = {None: 'visible', |
|
41 | 41 | 'visible-hidden': 'visible', |
|
42 | 42 | 'visible': 'served', |
|
43 | 'served.hidden': 'served', | |
|
43 | 44 | 'served': 'immutable', |
|
44 | 45 | 'immutable': 'base'} |
|
45 | 46 |
@@ -86,6 +86,14 b' def computehidden(repo, visibilityexcept' | |||
|
86 | 86 | _revealancestors(pfunc, hidden, visible) |
|
87 | 87 | return frozenset(hidden) |
|
88 | 88 | |
|
89 | def computesecret(repo, visibilityexceptions=None): | |
|
90 | """compute the set of revision that can never be exposed through hgweb | |
|
91 | ||
|
92 | Changeset in the secret phase (or above) should stay unaccessible.""" | |
|
93 | assert not repo.changelog.filteredrevs | |
|
94 | secrets = repo._phasecache.getrevset(repo, phases.remotehiddenphases) | |
|
95 | return frozenset(secrets) | |
|
96 | ||
|
89 | 97 | def computeunserved(repo, visibilityexceptions=None): |
|
90 | 98 | """compute the set of revision that should be filtered when used a server |
|
91 | 99 | |
@@ -93,9 +101,9 b' def computeunserved(repo, visibilityexce' | |||
|
93 | 101 | assert not repo.changelog.filteredrevs |
|
94 | 102 | # fast path in simple case to avoid impact of non optimised code |
|
95 | 103 | hiddens = filterrevs(repo, 'visible') |
|
96 |
secrets = |
|
|
104 | secrets = filterrevs(repo, 'served.hidden') | |
|
97 | 105 | if secrets: |
|
98 |
return frozenset(hiddens | |
|
|
106 | return frozenset(hiddens | secrets) | |
|
99 | 107 | else: |
|
100 | 108 | return hiddens |
|
101 | 109 | |
@@ -141,6 +149,7 b' def computeimpactable(repo, visibilityex' | |||
|
141 | 149 | # from scratch (very slow). |
|
142 | 150 | filtertable = {'visible': computehidden, |
|
143 | 151 | 'visible-hidden': computehidden, |
|
152 | 'served.hidden': computesecret, | |
|
144 | 153 | 'served': computeunserved, |
|
145 | 154 | 'immutable': computemutable, |
|
146 | 155 | 'base': computeimpactable} |
General Comments 0
You need to be logged in to leave comments.
Login now