lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Starting with 
https://phab.mercurial-scm.org/rHG5aef5afa8654d0f32423d2b6cb51a47f3ccbe6d3, a 
valid delta parent might be "refined". This
  allows repository using sparse-revlog to produce better delta chain by using
  better intermediate snapshot base.
  
  However, this refining step was performed in all cases, including for
  repository not using sparse-revlog. This could produce a strange chain in the
  general delta case and corrupted repository in the non-general delta case.
  
  We now skip this step unless sparse-revlog is in use.
  
  In issue 6006, Yuya Nishihara provided a test case using an external
  repository, so we did not include it. Finding "laboratory" condition to
  reproduce this case and implementing an efficient test reproducing it is a bit
  tricky. We do not foresee to have the time to provide one by the release date.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5197

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
@@ -646,6 +646,11 @@
         if good is not None:
             break
 
+    # If sparse revlog is enabled, we can try to refine the available deltas
+    if not revlog._sparserevlog:
+        yield None
+        return
+
     # if we have a refinable value, try to refine it
     if good is not None and good not in (p1, p2) and revlog.issnapshot(good):
         # refine snapshot down



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to