Show More
@@ -585,12 +585,14 b' def is_good_delta_info(revlog, deltainfo' | |||||
585 | if deltainfo is None: |
|
585 | if deltainfo is None: | |
586 | return False |
|
586 | return False | |
587 |
|
587 | |||
588 | if ( |
|
588 | # the DELTA_BASE_REUSE_FORCE case should have been taken care of sooner so | |
589 | revinfo.cachedelta is not None |
|
589 | # we should never end up asking such question. Adding the assert as a | |
590 | and deltainfo.base == revinfo.cachedelta[0] |
|
590 | # safe-guard to detect anything that would be fishy in this regard. | |
591 | and revinfo.cachedelta[2] == DELTA_BASE_REUSE_FORCE |
|
591 | assert ( | |
592 | ): |
|
592 | revinfo.cachedelta is None | |
593 | return True |
|
593 | or revinfo.cachedelta[2] != DELTA_BASE_REUSE_FORCE | |
|
594 | or not revlog._generaldelta | |||
|
595 | ) | |||
594 |
|
596 | |||
595 | # - 'deltainfo.distance' is the distance from the base revision -- |
|
597 | # - 'deltainfo.distance' is the distance from the base revision -- | |
596 | # bounding it limits the amount of I/O we need to do. |
|
598 | # bounding it limits the amount of I/O we need to do. | |
@@ -693,14 +695,14 b' def _candidategroups(' | |||||
693 | yield None |
|
695 | yield None | |
694 | return |
|
696 | return | |
695 |
|
697 | |||
696 | if ( |
|
698 | # the DELTA_BASE_REUSE_FORCE case should have been taken care of sooner so | |
697 | cachedelta is not None |
|
699 | # we should never end up asking such question. Adding the assert as a | |
698 | and nullrev == cachedelta[0] |
|
700 | # safe-guard to detect anything that would be fishy in this regard. | |
699 | and cachedelta[2] == DELTA_BASE_REUSE_FORCE |
|
701 | assert ( | |
700 | ): |
|
702 | cachedelta is None | |
701 | # instruction are to forcibly do a full snapshot |
|
703 | or cachedelta[2] != DELTA_BASE_REUSE_FORCE | |
702 | yield None |
|
704 | or not revlog._generaldelta | |
703 | return |
|
705 | ) | |
704 |
|
706 | |||
705 | deltalength = revlog.length |
|
707 | deltalength = revlog.length | |
706 | deltaparent = revlog.deltaparent |
|
708 | deltaparent = revlog.deltaparent | |
@@ -736,15 +738,6 b' def _candidategroups(' | |||||
736 | if rev in tested: |
|
738 | if rev in tested: | |
737 | continue |
|
739 | continue | |
738 |
|
740 | |||
739 | if ( |
|
|||
740 | cachedelta is not None |
|
|||
741 | and rev == cachedelta[0] |
|
|||
742 | and cachedelta[2] == DELTA_BASE_REUSE_FORCE |
|
|||
743 | ): |
|
|||
744 | # instructions are to forcibly consider/use this delta base |
|
|||
745 | group.append(rev) |
|
|||
746 | continue |
|
|||
747 |
|
||||
748 | # an higher authority deamed the base unworthy (e.g. censored) |
|
741 | # an higher authority deamed the base unworthy (e.g. censored) | |
749 | if excluded_bases is not None and rev in excluded_bases: |
|
742 | if excluded_bases is not None and rev in excluded_bases: | |
750 | tested.add(rev) |
|
743 | tested.add(rev) |
General Comments 0
You need to be logged in to leave comments.
Login now