[PATCH 1 of 8] upgrade: always use full text if "full-add" mode is enable

Gregory Szorc gregory.szorc at gmail.com
Mon Aug 5 22:39:07 EDT 2019


On Mon, Aug 5, 2019 at 9:49 AM Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at octobus.net>
> # Date 1560345769 -3600
> #      Wed Jun 12 14:22:49 2019 +0100
> # Node ID 8d019de36e616e8d71ba19c713a6f85cdc8beb60
> # Parent  f95b59ffc307c4549d9640a81d750a99bd75f423
> # EXP-Topic upgrade-select
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 8d019de36e61
> upgrade: always use full text if "full-add" mode is enable
>

Queued parts 1-5.


>
> 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.
>
> diff --git a/mercurial/revlog.py b/mercurial/revlog.py
> --- a/mercurial/revlog.py
> +++ b/mercurial/revlog.py
> @@ -2461,7 +2461,8 @@ class revlog(object):
>                  # 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)))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190805/621e5360/attachment.html>


More information about the Mercurial-devel mailing list