Pulkit Goyal <7895pulkit@gmail.com> [Wed, 30 Dec 2020 16:39:35 +0530] rev 46218
engine: prevent multiple checking of re-delta-multibase
The _perform_clone function is called for each revlog cloned, hence we should
prevent this function call overhead.
Differential Revision: https://phab.mercurial-scm.org/D9669
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 30 Dec 2020 16:33:49 +0530] rev 46217
engine: pass upgrade operation inside `_perform_clone()`
Same as previous patch.
Differential Revision: https://phab.mercurial-scm.org/D9668
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 30 Dec 2020 16:29:33 +0530] rev 46216
engine: pass upgrade operation inside _clonerevlogs()
Better to pass the operation instead of passing three of it's members (one of
the them is a function call) separately.
This will also be useful in future when we will like to control which things are
upgraded.
Differential Revision: https://phab.mercurial-scm.org/D9667
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 30 Dec 2020 16:20:25 +0530] rev 46215
actions: store deltareuse mode of whole operation in UpgradeOperation
UpgradeOperation should provide easy access to all the things related to the
current operation. Clients should not need to compute them.
Differential Revision: https://phab.mercurial-scm.org/D9666
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 30 Dec 2020 16:11:24 +0530] rev 46214
engine: refactor how total dstsize is calculated
Instead of increasing it with each revlog, we just get the sum of total
destination changelog, manifest and filelogs sizes.
Differential Revision: https://phab.mercurial-scm.org/D9665
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 Dec 2020 14:00:41 +0530] rev 46213
upgrade: introduce post upgrade and downgrade message for improvements
For certain imporvements, we will like to show a message after the operation
completed. This patch introduces that functionality.
Right now it's only used by share-safe feature.
Differential Revision: https://phab.mercurial-scm.org/D9619
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 Dec 2020 15:04:17 +0530] rev 46212
actions: introduce function to calculate downgrades
An upgrade operation can also downgrade/remove some format variants. Before this
patch there was no clean way to find out all such variants which will be
removed. This patch adds a function for that.
It will be used in next patch.
Differential Revision: https://phab.mercurial-scm.org/D9618
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 Dec 2020 14:55:27 +0530] rev 46211
debugupgraderepo: minor documentation fix
When we specify `--no-changelog --no-manifest --no-filelog` we skip all revlog
optimization instead of all filelog optimization.
Also while I was here, for consistency, I did `optimisation` -> `optimization`
to make it consistent with rest of occurrences.
Note: I am not native speaker and I only changed it because of consistency. I
don't know which one is correct.
Differential Revision: https://phab.mercurial-scm.org/D9617
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 Dec 2020 14:16:10 +0530] rev 46210
upgrade: rename actions to upgrade_actions
The `actions` were a list of optimizations and format upgrades which will be
upgraded. This does not include things which will be downgraded.
Let's rename the variable for clarity. It now makes obvious that we don't have
any concrete information on what things are downgraded.
Differential Revision: https://phab.mercurial-scm.org/D9616
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 Dec 2020 14:06:24 +0530] rev 46209
upgrade: move optimization addition to determineactions()
The documentation of `determineactions()` mention that it is given a list
returned from `findoptimizations()` however it was not true before this patch.
The code extending actions with optimizations also mentioned about it that this
should be in determineactions.
So let's do what comments at couple of places say.
Differential Revision: https://phab.mercurial-scm.org/D9615