D5201: delta: skip "empty delta" optimisation for non-general case (issue6006)
lothiraldan (Boris Feld)
phabricator at mercurial-scm.org
Thu Nov 1 12:39:48 UTC 2018
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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 https://phab.mercurial-scm.org/rHGbafa1c4bb7a8d397f62e0cd75b8064ef1375b753.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5201
AFFECTED FILES
mercurial/revlogutils/deltas.py
CHANGE DETAILS
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 @@
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
To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list