split: add tests which demonstrate the
issue5864
Differential Revision: https://phab.mercurial-scm.org/D6057
discovery: clarify why the caching of children is valid
Yuya Nishihara pointed out that the code looks wrong without this clarification.
(And, unsurprisingly, Yuya is right)
tests: clarify test setup test in test-uncommit.t
I assume the "hg uncommit b" is there to prove that the working copy
is dirty before we try "hg uncommit --allow-dirty-working-copy b". It
seems clearer to put that check just before we run the actual test.
Differential Revision: https://phab.mercurial-scm.org/D6078
tests: fix a stale reference to experimental.uncommitondirtywdir
These tests no longer test the config option, they test the command
line flag.
Differential Revision: https://phab.mercurial-scm.org/D6077
discovery: explicitly use `undecided` for the children mapping
Recent performance achievements makes the assumption that the `undecided` set
is used for sampling. That assumption is always true in practice. We stop
pretending that taking anything else would make sense and we directly use the
`undecided` set from the object. This provides a more honest API.
discovery: cache the children mapping used during each discovery
During discovery, the `undecided` set keep shrinking. Therefore, the map
computed for an iteration N will be valid for iteration N+1. Instead of
computing the same data over and over we cache it the first time.
Our private pathological case speed up from about 7.5 seconds to about 6.3
seconds.
(starting from over 70s at the start of the full series)
discovery: move children computation in its own method
This clarifies the main logic and starts to pave the way to some caching.
discovery: simplify the building of the children mapping
Since we only care about the revisions inside the set we are sampling, we can
use simpler code (and probably sightly faster).