##// END OF EJS Templates
revlog: remove legacy usage of `_srmingapsize`...
marmoute -
r51956:533d6943 default
parent child Browse files
Show More
@@ -50,7 +50,6 b' class _testrevlog:'
50 50 from .. import revlog
51 51
52 52 self._data = data
53 self._srmingapsize = mingap
54 53 self.data_config = revlog.DataConfig()
55 54 self.data_config.sr_density_threshold = density
56 55 self.data_config.sr_min_gap_size = mingap
@@ -91,11 +90,11 b' def slicechunk(revlog, revs, targetsize='
91 90
92 91 The initial chunk is sliced until the overall density (payload/chunks-span
93 92 ratio) is above `revlog.data_config.sr_density_threshold`. No gap smaller
94 than `revlog._srmingapsize` is skipped.
93 than `revlog.data_config.sr_min_gap_size` is skipped.
95 94
96 95 If `targetsize` is set, no chunk larger than `targetsize` will be yield.
97 96 For consistency with other slicing choice, this limit won't go lower than
98 `revlog._srmingapsize`.
97 `revlog.data_config.sr_min_gap_size`.
99 98
100 99 If individual revisions chunk are larger than this limit, they will still
101 100 be raised individually.
@@ -144,14 +143,16 b' def slicechunk(revlog, revs, targetsize='
144 143 [[-1], [13], [15]]
145 144 """
146 145 if targetsize is not None:
147 targetsize = max(targetsize, revlog._srmingapsize)
146 targetsize = max(targetsize, revlog.data_config.sr_min_gap_size)
148 147 # targetsize should not be specified when evaluating delta candidates:
149 148 # * targetsize is used to ensure we stay within specification when reading,
150 149 densityslicing = getattr(revlog.index, 'slicechunktodensity', None)
151 150 if densityslicing is None:
152 151 densityslicing = lambda x, y, z: _slicechunktodensity(revlog, x, y, z)
153 152 for chunk in densityslicing(
154 revs, revlog.data_config.sr_density_threshold, revlog._srmingapsize
153 revs,
154 revlog.data_config.sr_density_threshold,
155 revlog.data_config.sr_min_gap_size,
155 156 ):
156 157 for subchunk in _slicechunktosize(revlog, chunk, targetsize):
157 158 yield subchunk
General Comments 0
You need to be logged in to leave comments. Login now