changeset 42688:716d575df275

upgrade: always use full text if "full-add" mode is enable We should not be using a delta since the goal is to perform a full addition from scratch in all cases. Without this patch, `hg debugupgraderepo --optimize re-delta-fulladd --run` can crash.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 12 Jun 2019 14:22:49 +0100
parents 26a31c88e1a5
children 896fb9deeaf8
files mercurial/revlog.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Sun Aug 04 22:14:26 2019 +0200
+++ b/mercurial/revlog.py	Wed Jun 12 14:22:49 2019 +0100
@@ -2461,7 +2461,8 @@
                 # the revlog chunk is a delta.
                 cachedelta = None
                 rawtext = None
-                if destrevlog._lazydelta:
+                if (deltareuse != self.DELTAREUSEFULLADD
+                        and destrevlog._lazydelta):
                     dp = self.deltaparent(rev)
                     if dp != nullrev:
                         cachedelta = (dp, bytes(self._chunk(rev)))