##// END OF EJS Templates
snapshot: make sure we'll never refine delta base from a reused source...
Boris Feld -
r39537:993d7e2c default
parent child Browse files
Show More
@@ -630,6 +630,19 b' def _findsnapshots(revlog, cache, start_'
630
630
631 def _refinedgroups(revlog, p1, p2, cachedelta):
631 def _refinedgroups(revlog, p1, p2, cachedelta):
632 good = None
632 good = None
633 # First we try to reuse a the delta contained in the bundle.
634 # (or from the source revlog)
635 #
636 # This logic only applies to general delta repositories and can be disabled
637 # through configuration. Disabling reuse source delta is useful when
638 # we want to make sure we recomputed "optimal" deltas.
639 if cachedelta and revlog._generaldelta and revlog._lazydeltabase:
640 # Assume what we received from the server is a good choice
641 # build delta will reuse the cache
642 good = yield (cachedelta[0],)
643 if good is not None:
644 yield None
645 return
633 for candidates in _rawgroups(revlog, p1, p2, cachedelta):
646 for candidates in _rawgroups(revlog, p1, p2, cachedelta):
634 good = yield candidates
647 good = yield candidates
635 if good is not None:
648 if good is not None:
@@ -651,17 +664,6 b' def _rawgroups(revlog, p1, p2, cachedelt'
651 prev = curr - 1
664 prev = curr - 1
652 deltachain = lambda rev: revlog._deltachain(rev)[0]
665 deltachain = lambda rev: revlog._deltachain(rev)[0]
653
666
654 # First we try to reuse a the delta contained in the bundle.
655 # (or from the source revlog)
656 #
657 # This logic only applies to general delta repositories and can be disabled
658 # through configuration. Disabling reuse of source delta is useful when
659 # we want to make sure we recomputed "optimal" deltas.
660 if cachedelta and gdelta and revlog._lazydeltabase:
661 # Assume what we received from the server is a good choice
662 # build delta will reuse the cache
663 yield (cachedelta[0],)
664
665 if gdelta:
667 if gdelta:
666 # exclude already lazy tested base if any
668 # exclude already lazy tested base if any
667 parents = [p for p in (p1, p2) if p != nullrev]
669 parents = [p for p in (p1, p2) if p != nullrev]
General Comments 0
You need to be logged in to leave comments. Login now