Boris Feld <boris.feld@octobus.net> [Fri, 28 Dec 2018 03:14:34 +0100] rev 41112
discovery: introduce a partialdiscovery object
This object will ultimately gather the data about common, undecided and
missing revs in a single place and deal with most graph related computations.
The goal is both to clarify the algorithm and to help provides a simple and
clear API that can be reimplemented in Rust.
For now, we only moved the `common` set in the object. In this commit, some
direct access to the "private" `disco._common` attribute persist. They have
not been removed yet because we won't need to expose a full API identical to
`incrementalmissingancestors` and it seems simpler to access the attribute
directly until the replacement is in place.
Boris Feld <boris.feld@octobus.net> [Fri, 14 Dec 2018 12:01:15 +0100] rev 41111
discovery: move handling of sampling special case inside sampling function
The handling of cases where the number of revisions to sample is smaller than
the sample size can be moved with the sample function themselves. This
simplifies main logic, preparing a coming refactoring.
Boris Feld <boris.feld@octobus.net> [Fri, 04 Jan 2019 17:49:59 +0100] rev 41110
discovery: minor fix to some conditionals
Since `size` is the upper limit of the sample, we should include it in the
check. Otherwize the `more` variable will be zero and the sampling will be
useless