Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 42711: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 | 24111fb9a725 |
children | 389233789952 |
comparison
equal
deleted
inserted
replaced
42710:26a31c88e1a5 | 42711:716d575df275 |
---|---|
2459 | 2459 |
2460 # (Possibly) reuse the delta from the revlog if allowed and | 2460 # (Possibly) reuse the delta from the revlog if allowed and |
2461 # the revlog chunk is a delta. | 2461 # the revlog chunk is a delta. |
2462 cachedelta = None | 2462 cachedelta = None |
2463 rawtext = None | 2463 rawtext = None |
2464 if destrevlog._lazydelta: | 2464 if (deltareuse != self.DELTAREUSEFULLADD |
2465 and destrevlog._lazydelta): | |
2465 dp = self.deltaparent(rev) | 2466 dp = self.deltaparent(rev) |
2466 if dp != nullrev: | 2467 if dp != nullrev: |
2467 cachedelta = (dp, bytes(self._chunk(rev))) | 2468 cachedelta = (dp, bytes(self._chunk(rev))) |
2468 | 2469 |
2469 if not cachedelta: | 2470 if not cachedelta: |