Boris Feld <boris.feld@octobus.net> [Wed, 11 Jul 2018 13:48:44 +0200] rev 38647
debugdeltachain: protect against 0 readsize
If you don't read any data, read density should be 1.
Paul Morelle <paul.morelle@octobus.net> [Thu, 21 Jun 2018 18:19:57 +0200] rev 38646
debugdeltachain: avoid division by zero when a chain is empty
The two ratios chainratio and extraratio are computed using dividers
that may be zero when the file is empty.
As the denominators are integers, the limit of the ratio "just before zero" is
the numerator value itself.
If the numerator itself is zero, the ratio value is still meaningful: in both
cases, a "good" value is a low ratio, and a size of zero is the optimal case.
Danny Hooper <hooper@google.com> [Mon, 09 Jul 2018 15:33:49 -0700] rev 38645
tests: prevent conflict markers in test case from triggering warnings
Broadly, having lines that begin with several '<' tends to trigger tools that
try to warn you about unresolved conflicts. It will save some headaches to
tweak this string literal to avoid that.
Differential Revision: https://phab.mercurial-scm.org/D3897
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 12:20:57 +0200] rev 38644
revlog: enforce chunk slicing down to a certain size
Limit maximum chunk size to 4x final size when reading a revision from a
revlog. We only apply this logic when the target size is known from the
revlog.
Ideally, revlog's delta chain would be written in a way that does not trigger
this extra slicing often. However, having this second guarantee that we won't
read unexpectedly large amounts of memory in all cases is important for the
future. Future delta chain building algorithms might have good reason to
create delta chain with such characteristics.
Including this code in core as soon as possible will make Mercurial 4.7
forward-compatible with such improvement.
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 11:57:33 +0200] rev 38643
revlog: postprocess chunk to slice them down to a certain size
After the density slicing is done, we enforce a maximum chunk size to avoid
memory consumption issue.
Boris Feld <boris.feld@octobus.net> [Wed, 11 Jul 2018 00:35:01 -0700] rev 38642
revlog: add function to slice chunk down to a given size
It is possible to encounter situations where the slicing based on density did
not achieve chunk smaller than the 4*textlength limit. To avoid extra memory
consumption in those cases, we need to be able to break down chunk to a given
size. Actual caller comes in the next changesets.
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 11:53:36 +0200] rev 38641
revlog: extract density based slicing into its own function
We are going to introduce another slicing step. We start by extracting the
existing one into its own function.
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 10:34:33 +0200] rev 38640
revlog: document and test _slicechunk
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 10:18:46 +0200] rev 38639
revlog: add a doctest for _segmentspan
Boris Feld <boris.feld@octobus.net> [Tue, 10 Jul 2018 10:04:44 +0200] rev 38638
revlog: add a doctest to _trimchunk