##// END OF EJS Templates
clfilter: introduces a hidden filter...
Pierre-Yves David -
r18242:e4687ede default
parent child Browse files
Show More
@@ -9,6 +9,16 b''
9 9 import copy
10 10 import phases
11 11
12
13 def computehidden(repo):
14 """compute the set of hidden revision to filter
15
16 During most operation hidden should be filtered."""
17 assert not repo.changelog.filteredrevs
18 if repo.obsstore:
19 return frozenset(repo.revs('hidden()'))
20 return frozenset()
21
12 22 def computeunserved(repo):
13 23 """compute the set of revision that should be filtered when used a server
14 24
@@ -20,14 +30,16 b' def computeunserved(repo):'
20 30 return frozenset()
21 31
22 32 # function to compute filtered set
23 filtertable = {'unserved': computeunserved}
33 filtertable = {'hidden': computehidden,
34 'unserved': computeunserved}
24 35 ### Nearest subset relation
25 36 # Nearest subset of filter X is a filter Y so that:
26 37 # * Y is included in X,
27 38 # * X - Y is as small as possible.
28 39 # This create and ordering used for branchmap purpose.
29 40 # the ordering may be partial
30 subsettable = {None: 'unserved'}
41 subsettable = {None: 'hidden',
42 'hidden': 'unserved'}
31 43
32 44 def filteredrevs(repo, filtername):
33 45 """returns set of filtered revision for this filter name"""
@@ -176,9 +176,9 b' visible shared between the initial repo '
176 176 check that branch cache with "unserved" filter are properly computed and stored
177 177
178 178 $ ls ../push-dest/.hg/cache/branchheads*
179 ../push-dest/.hg/cache/branchheads
179 ../push-dest/.hg/cache/branchheads-hidden
180 180 ../push-dest/.hg/cache/branchheads-unserved
181 $ cat ../push-dest/.hg/cache/branchheads
181 $ cat ../push-dest/.hg/cache/branchheads-hidden
182 182 6d6770faffce199f1fddd1cf87f6f026138cf061 6
183 183 b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e default
184 184 2713879da13d6eea1ff22b442a5a87cb31a7ce6a default
General Comments 0
You need to be logged in to leave comments. Login now