--- a/mercurial/upgrade_utils/actions.py Wed Dec 30 16:11:24 2020 +0530
+++ b/mercurial/upgrade_utils/actions.py Wed Dec 30 16:20:25 2020 +0530
@@ -12,6 +12,7 @@
error,
localrepo,
requirements,
+ revlog,
util,
)
@@ -646,6 +647,17 @@
i for i in all_optimizations if i not in self.upgrade_actions
]
+ # delta reuse mode of this upgrade operation
+ self.delta_reuse_mode = revlog.revlog.DELTAREUSEALWAYS
+ if b're-delta-all' in self._upgrade_actions_names:
+ self.delta_reuse_mode = revlog.revlog.DELTAREUSENEVER
+ elif b're-delta-parent' in self._upgrade_actions_names:
+ self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS
+ elif b're-delta-multibase' in self._upgrade_actions_names:
+ self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS
+ elif b're-delta-fulladd' in self._upgrade_actions_names:
+ self.delta_reuse_mode = revlog.revlog.DELTAREUSEFULLADD
+
def _write_labeled(self, l, label):
"""
Utility function to aid writing of a list under one label