# HG changeset patch # User Boris Feld # Date 1536567081 -7200 # Node ID bdb41eaa8b597713983ac0b293ce552a1d516da9 # Parent c8514f858788ffebee5f5e01a24d20e00e9d68a8 snapshot: fix line order when skipping over empty deltas The code movement in 37957e07138c introduced an error. Since 8f83a953dddf, we discarded some revisions because they are identical to their delta base (and use that delta base instead). That logic is good, however, in 37957e07138c we mixed up the order of two line, adding the "new" revision to the set of already tested one, instead of the discarded one. So in practice, we were never investigating any revisions in a chain starting with an empty delta. Creating significantly worst delta chain (eg: Mercurial's manifest move goes from about 60MB up to about 80MB). diff -r c8514f858788 -r bdb41eaa8b59 mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py Wed Sep 12 23:10:59 2018 -0400 +++ b/mercurial/revlogutils/deltas.py Mon Sep 10 10:11:21 2018 +0200 @@ -596,8 +596,8 @@ 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)): + tested.add(rev) rev = deltaparent(rev) - tested.add(rev) # filter out revision we tested already if rev in tested: continue