phases: use a Struct object for binary encoding and decoding
We will move the binary encoding and decoding code to 'phases.py' in order to
make it easier to reuse. First, let's cleanup it a bit.
discovery: avoid dropping remote heads hidden locally
An extra post processing was added to recognize remote heads that are hidden
locally as "common" instead of "unknown". However, this processing was
removing such hidden heads from the remote heads sets.
It had no impact because we used to pull phase information from all remote
heads.
This series will replace the phase pulling operation to a more efficient
process but requires the unmodified pulled set information.
test-patchbomb: use mocktime
The test was using system time for displaying ETAs, which could be flaky if
the sysload is high. This patch extracts mocktime.py from test-progress.t to
make sure test-patchbomb.t is unaffected by system time.
Differential Revision: https://phab.mercurial-scm.org/D844
test-patchbomb: fix the test
With the experimental config `progress.estimate` removed, the progress
output in `test-patchbomb.t` has a minor change: it shows ETA since the
beginning.
(This could be folded into f428c3)
progress: make ETA only consider progress made in the last minute
This patch limits the estimate time interval to roughly the last minute
(configurable by `estimateinterval`) to be more practical. See the test
change for why this is better.
.. feature:: Estimated time is more accurate with non-linear progress
Differential Revision: https://phab.mercurial-scm.org/D820
progress: remove progress.estimate config
It was introduced by 98e4d39 ("progress: add speed format" 2011-5-9) and was
intended to hide ETA information for the first few seconds.
Later 5d261fd ("progress: add a changedelay to prevent parallel topics from
flapping (
issue2698)" 2011-6-23) introduced `changedelay` config which hides
the entire progress bar for the first few seconds. So `progress.estimate` seems
somehow duplicated feature-wise. Since it's experimental and duplicated, let's
just remove it. This makes the next patch simpler - it no longer needs to make
sure `starttimes` is the real start time.
Differential Revision: https://phab.mercurial-scm.org/D828
progress: demonstrate non-linear progress has a bad ETA experience
Previously, the ETA and speed assumes the progress is linear. Often, due to
network or other issues, it could be fast for the most time, and suddenly
slow down:
[====================================================> ]
\___________________________________________/\______/
very fast suddenly much slower
This patch adds a test demonstrating the ETA could be way off in those
cases.
Differential Revision: https://phab.mercurial-scm.org/D819
copytrace: add a a new config to limit the number of drafts in heuristics
The heuristics options tries to the default full copytracing algorithm if both
the source and destination branches contains of non-public changesets only. But
this can be slow in cases when we have a lot of drafts.
This patch adds a new config option experimental.copytrace.sourcecommitlimit
which defaults to 100. This value will be the limit of number of drafts from c1
to base. Incase there are more changesets even though they are draft, the
heuristics algorithm will be used.
Differential Revision: https://phab.mercurial-scm.org/D763