changeset 39488:d629b6d2f05a

revlog: clarify the comment attached to delta reuse The previous version was a bit complicated and referred to a deprecated configuration option.
author Boris Feld <boris.feld@octobus.net>
date Tue, 04 Sep 2018 21:28:28 +0200
parents 931386a0b108
children f1186c292d03
files mercurial/revlogutils/deltas.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Tue Sep 04 21:05:21 2018 +0200
+++ b/mercurial/revlogutils/deltas.py	Tue Sep 04 21:28:28 2018 +0200
@@ -621,10 +621,12 @@
     curr = len(revlog)
     prev = curr - 1
 
-    # This condition is true most of the time when processing
-    # changegroup data into a generaldelta repo. The only time it
-    # isn't true is if this is the first revision in a delta chain
-    # or if ``format.generaldelta=true`` disabled ``lazydeltabase``.
+    # First we try to reuse a the delta contained in the bundle.
+    # (or from the source revlog)
+    #
+    # This logic only applies to general delta repositories and can be disabled
+    # through configuration. Disabling reuse of source delta is useful when
+    # we want to make sure we recomputed "optimal" deltas.
     if cachedelta and gdelta and revlog._lazydeltabase:
         # Assume what we received from the server is a good choice
         # build delta will reuse the cache