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.
--- 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)))