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

login
register
mail settings
Submitter Paul Morelle
Date May 21, 2018, 9:47 p.m.
Message ID <054469518b3480201e7f.1526939273@belenos.localdomain>
Download mbox | patch
Permalink /patch/31794/
State Accepted
Headers show

Comments

Paul Morelle - May 21, 2018, 9:47 p.m.
# HG changeset patch
# User Paul Morelle <paul.morelle@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
Gregory Szorc - May 21, 2018, 11:12 p.m.
On Mon, May 21, 2018 at 2:47 PM, Paul Morelle <paul.morelle@octobus.net>
wrote:

> # HG changeset patch
> # User Paul Morelle <paul.morelle@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@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
Paul Morelle - May 22, 2018, 8:08 a.m.
On 22/05/18 01:12, Gregory Szorc wrote:
> On Mon, May 21, 2018 at 2:47 PM, Paul Morelle
> <paul.morelle@octobus.net <mailto:paul.morelle@octobus.net>> wrote:
>
>     # HG changeset patch
>     # User Paul Morelle <paul.morelle@octobus.net
>     <mailto:paul.morelle@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/
>     <https://bitbucket.org/octobus/mercurial-devel/>
>     #              hg pull
>     https://bitbucket.org/octobus/mercurial-devel/
>     <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?
Sure!

However, I am not certain that I have done this properly, as [PATCH 5 of
6] and [PATCH 6 of 6] were sent as [PATCH 1 of 2 V2] and [PATCH 2 of 2 V2].
Is it correct even if the numbers don't match?

Thanks,

Paul
>  
>
>
>     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@mercurial-scm.org
>     <mailto:Mercurial-devel@mercurial-scm.org>
>     https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>     <https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel>
>
>
Gregory Szorc - May 24, 2018, 1:04 a.m.
On Tue, May 22, 2018 at 1:08 AM, Paul Morelle <paul.morelle@octobus.net>
wrote:

>
> On 22/05/18 01:12, Gregory Szorc wrote:
>
> On Mon, May 21, 2018 at 2:47 PM, Paul Morelle <paul.morelle@octobus.net>
> wrote:
>
>> # HG changeset patch
>> # User Paul Morelle <paul.morelle@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?
>
> Sure!
>
> However, I am not certain that I have done this properly, as [PATCH 5 of
> 6] and [PATCH 6 of 6] were sent as [PATCH 1 of 2 V2] and [PATCH 2 of 2 V2].
> Is it correct even if the numbers don't match?
>

Yes, it's fine if the patch numbers don't match. It can confuse our review
tools slightly. But that's not your problem.

FWIW Phabricator generally handles partially landed series better than
email, since it tracks series more loosely than the email tools do.


>
>
>
>>
>> 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@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>>
>
>
>

Patch

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]