changeset 40425:324ba8b14d78 stable

delta: skip "empty delta" optimisation for non-general case (issue6006) Non-general delta repository cannot delta against anything than prev. So even if the delta to prev is empty we should use it. This is similar to the change made in bafa1c4bb7a8. Differential Revision: https://phab.mercurial-scm.org/D5201
author Boris Feld <boris.feld@octobus.net>
date Thu, 01 Nov 2018 12:52:16 +0100
parents 07a66c1387d1
children 683e99f0b30c
files mercurial/revlogutils/deltas.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Thu Nov 01 16:32:16 2018 -0700
+++ b/mercurial/revlogutils/deltas.py	Thu Nov 01 12:52:16 2018 +0100
@@ -593,7 +593,10 @@
         group = []
         for rev in temptative:
             # skip over empty delta (no need to include them in a chain)
-            while not (rev == nullrev or rev in tested or deltalength(rev)):
+            while (revlog._generaldelta
+                   and not (rev == nullrev
+                            or rev in tested
+                            or deltalength(rev))):
                 tested.add(rev)
                 rev = deltaparent(rev)
             # filter out revision we tested already