revlog: clarify the comment attached to delta reuse
authorBoris Feld <boris.feld@octobus.net>
Tue, 04 Sep 2018 21:28:28 +0200
changeset 39488 d629b6d2f05a
parent 39487 931386a0b108
child 39489 f1186c292d03
revlog: clarify the comment attached to delta reuse The previous version was a bit complicated and referred to a deprecated configuration option.
mercurial/revlogutils/deltas.py
--- 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