[PATCH 1 of 6] revlog: in _getcandidaterevs, shorten revlog._generaldelta to gdelta

Gregory Szorc gregory.szorc at gmail.com
Mon May 21 19:12:46 EDT 2018


On Mon, May 21, 2018 at 2:47 PM, Paul Morelle <paul.morelle at octobus.net>
wrote:

> # HG changeset patch
> # User Paul Morelle <paul.morelle at octobus.net>
> # Date 1525438855 -7200
> #      Fri May 04 15:00:55 2018 +0200
> # Node ID 054469518b3480201e7f8ada16957027009e9f64
> # Parent  514605777244de61b68c7e1503c4f106773913f4
> # EXP-Topic semi-snapshots
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 054469518b34
> revlog: in _getcandidaterevs, shorten revlog._generaldelta to gdelta
>

Queued parts 1-4. Thanks.

Part 5 failed to apply cleanly. Could you please rebase and resend?


>
> diff -r 514605777244 -r 054469518b34 mercurial/revlog.py
> --- a/mercurial/revlog.py       Fri May 11 23:28:02 2018 -0700
> +++ b/mercurial/revlog.py       Fri May 04 15:00:55 2018 +0200
> @@ -305,6 +305,7 @@
>          grouped by level of easiness.
>          """
>          revlog = self.revlog
> +        gdelta = revlog._generaldelta
>          curr = len(revlog)
>          prev = curr - 1
>          p1r, p2r = revlog.rev(p1), revlog.rev(p2)
> @@ -316,13 +317,13 @@
>              # changegroup data into a generaldelta repo. The only time it
>              # isn't true is if this is the first revision in a delta chain
>              # or if ``format.generaldelta=true`` disabled
> ``lazydeltabase``.
> -            if cachedelta and revlog._generaldelta and
> revlog._lazydeltabase:
> +            if cachedelta and gdelta and revlog._lazydeltabase:
>                  # Assume what we received from the server is a good choice
>                  # build delta will reuse the cache
>                  yield (cachedelta[0],)
>                  tested.add(cachedelta[0])
>
> -            if revlog._generaldelta:
> +            if gdelta:
>                  # exclude already lazy tested base if any
>                  parents = [p for p in (p1r, p2r)
>                             if p != nullrev and p not in tested]
> _______________________________________________
> 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/20180521/6af55eda/attachment.html>


More information about the Mercurial-devel mailing list