changeset 38147:f79ba1d1b4b1

revlog: in _getcandidaterevs, shorten revlog._generaldelta to gdelta
author Paul Morelle <paul.morelle@octobus.net>
date Fri, 04 May 2018 15:00:55 +0200
parents f7a0398996ad
children b17fa9041695
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Sat May 19 14:24:36 2018 -0400
+++ 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]