Mercurial > hg
changeset 49776:acdb9a15137c
bundle: when forcing acceptance of incoming delta also accept snapshot
Snapshot where never considered reusable and the unbundling side always tried
to find a delta from them. In the `forced` mode this is counter-productive
because it will either connect two delta-tree that should not be connected or
it will spend potentially a lot of time because creating a full snapshot
anyway.
So in this mode, we accept the full snapshot as is.
This changeset is benchmarked with its children so please do not split them
apart when landing.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 06 Dec 2022 12:10:31 +0100 |
parents | d57b966cdeb1 |
children | e1953a34c110 |
files | mercurial/revlogutils/deltas.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py Wed Dec 07 20:05:19 2022 +0100 +++ b/mercurial/revlogutils/deltas.py Tue Dec 06 12:10:31 2022 +0100 @@ -684,6 +684,15 @@ yield None return + if ( + cachedelta is not None + and nullrev == cachedelta[0] + and cachedelta[2] == DELTA_BASE_REUSE_FORCE + ): + # instruction are to forcibly do a full snapshot + yield None + return + deltalength = revlog.length deltaparent = revlog.deltaparent sparse = revlog._sparserevlog