##// END OF EJS Templates
revlog: remove legacy usage of `_srdensitythreshold`...
marmoute -
r51955:8c614fa1 default
parent child Browse files
Show More
@@ -50,7 +50,6 b' class _testrevlog:'
50 from .. import revlog
50 from .. import revlog
51
51
52 self._data = data
52 self._data = data
53 self._srdensitythreshold = density
54 self._srmingapsize = mingap
53 self._srmingapsize = mingap
55 self.data_config = revlog.DataConfig()
54 self.data_config = revlog.DataConfig()
56 self.data_config.sr_density_threshold = density
55 self.data_config.sr_density_threshold = density
@@ -91,8 +90,8 b' def slicechunk(revlog, revs, targetsize='
91 Assume that revs are sorted.
90 Assume that revs are sorted.
92
91
93 The initial chunk is sliced until the overall density (payload/chunks-span
92 The initial chunk is sliced until the overall density (payload/chunks-span
94 ratio) is above `revlog._srdensitythreshold`. No gap smaller than
93 ratio) is above `revlog.data_config.sr_density_threshold`. No gap smaller
95 `revlog._srmingapsize` is skipped.
94 than `revlog._srmingapsize` is skipped.
96
95
97 If `targetsize` is set, no chunk larger than `targetsize` will be yield.
96 If `targetsize` is set, no chunk larger than `targetsize` will be yield.
98 For consistency with other slicing choice, this limit won't go lower than
97 For consistency with other slicing choice, this limit won't go lower than
@@ -152,7 +151,7 b' def slicechunk(revlog, revs, targetsize='
152 if densityslicing is None:
151 if densityslicing is None:
153 densityslicing = lambda x, y, z: _slicechunktodensity(revlog, x, y, z)
152 densityslicing = lambda x, y, z: _slicechunktodensity(revlog, x, y, z)
154 for chunk in densityslicing(
153 for chunk in densityslicing(
155 revs, revlog._srdensitythreshold, revlog._srmingapsize
154 revs, revlog.data_config.sr_density_threshold, revlog._srmingapsize
156 ):
155 ):
157 for subchunk in _slicechunktosize(revlog, chunk, targetsize):
156 for subchunk in _slicechunktosize(revlog, chunk, targetsize):
158 yield subchunk
157 yield subchunk
General Comments 0
You need to be logged in to leave comments. Login now