Mercurial > public > mercurial-scm > hg
comparison mercurial/revlogutils/deltas.py @ 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 | a33f394b2bfd |
comparison
equal
deleted
inserted
replaced
39487:931386a0b108 | 39488:d629b6d2f05a |
---|---|
619 """ | 619 """ |
620 gdelta = revlog._generaldelta | 620 gdelta = revlog._generaldelta |
621 curr = len(revlog) | 621 curr = len(revlog) |
622 prev = curr - 1 | 622 prev = curr - 1 |
623 | 623 |
624 # This condition is true most of the time when processing | 624 # First we try to reuse a the delta contained in the bundle. |
625 # changegroup data into a generaldelta repo. The only time it | 625 # (or from the source revlog) |
626 # isn't true is if this is the first revision in a delta chain | 626 # |
627 # or if ``format.generaldelta=true`` disabled ``lazydeltabase``. | 627 # This logic only applies to general delta repositories and can be disabled |
628 # through configuration. Disabling reuse of source delta is useful when | |
629 # we want to make sure we recomputed "optimal" deltas. | |
628 if cachedelta and gdelta and revlog._lazydeltabase: | 630 if cachedelta and gdelta and revlog._lazydeltabase: |
629 # Assume what we received from the server is a good choice | 631 # Assume what we received from the server is a good choice |
630 # build delta will reuse the cache | 632 # build delta will reuse the cache |
631 yield (cachedelta[0],) | 633 yield (cachedelta[0],) |
632 | 634 |