equal
deleted
inserted
replaced
18 |
18 |
19 from .constants import ( |
19 from .constants import ( |
20 COMP_MODE_DEFAULT, |
20 COMP_MODE_DEFAULT, |
21 COMP_MODE_INLINE, |
21 COMP_MODE_INLINE, |
22 COMP_MODE_PLAIN, |
22 COMP_MODE_PLAIN, |
|
23 DELTA_BASE_REUSE_NO, |
23 KIND_CHANGELOG, |
24 KIND_CHANGELOG, |
24 KIND_FILELOG, |
25 KIND_FILELOG, |
25 KIND_MANIFESTLOG, |
26 KIND_MANIFESTLOG, |
26 REVIDX_ISCENSORED, |
27 REVIDX_ISCENSORED, |
27 REVIDX_RAWTEXT_CHANGING_FLAGS, |
28 REVIDX_RAWTEXT_CHANGING_FLAGS, |
817 # |
818 # |
818 # This logic only applies to general delta repositories and can be disabled |
819 # This logic only applies to general delta repositories and can be disabled |
819 # through configuration. Disabling reuse source delta is useful when |
820 # through configuration. Disabling reuse source delta is useful when |
820 # we want to make sure we recomputed "optimal" deltas. |
821 # we want to make sure we recomputed "optimal" deltas. |
821 debug_info = None |
822 debug_info = None |
822 if cachedelta and revlog._generaldelta and revlog._lazydeltabase: |
823 if cachedelta is not None and cachedelta[2] > DELTA_BASE_REUSE_NO: |
823 # Assume what we received from the server is a good choice |
824 # Assume what we received from the server is a good choice |
824 # build delta will reuse the cache |
825 # build delta will reuse the cache |
825 if debug_info is not None: |
826 if debug_info is not None: |
826 debug_info['cached-delta.tested'] += 1 |
827 debug_info['cached-delta.tested'] += 1 |
827 good = yield (cachedelta[0],) |
828 good = yield (cachedelta[0],) |