# HG changeset patch # User Boris Feld # Date 2018-11-01 11:52:16 # Node ID 324ba8b14d7836a5cd4c5586f270391725168c0a # Parent 07a66c1387d171d3532526c1aa85eeee83763b46 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 diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py +++ b/mercurial/revlogutils/deltas.py @@ -593,7 +593,10 @@ def _candidategroups(revlog, textlen, p1 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