Show More
@@ -455,31 +455,19 b' def emitrevisions(' | |||||
455 | # There is a delta in storage. We try to use that because it |
|
455 | # There is a delta in storage. We try to use that because it | |
456 | # amounts to effectively copying data from storage and is |
|
456 | # amounts to effectively copying data from storage and is | |
457 | # therefore the fastest. |
|
457 | # therefore the fastest. | |
458 |
elif deltaparentrev |
|
458 | elif is_usable_base(deltaparentrev): | |
459 | # If the stored delta works, let us use it ! |
|
|||
460 | if is_usable_base(deltaparentrev): |
|
|||
461 |
|
|
459 | if debug_info is not None: | |
462 |
|
|
460 | debug_delta_source = "storage" | |
463 |
|
|
461 | baserev = deltaparentrev | |
464 | # No guarantee the receiver has the delta parent. Send delta |
|
462 | else: | |
465 | # against last revision (if possible), which in the common case |
|
463 | # No guarantee the receiver has the delta parent, or Storage has a | |
466 | # should be similar enough to this revision that the delta is |
|
464 | # fulltext revision. | |
467 |
# |
|
465 | # | |
468 | elif prevrev is not None: |
|
466 | # Send delta against last revision (if possible), which in the | |
469 | if debug_info is not None: |
|
467 | # common case should be similar enough to this revision that the | |
|
468 | # delta is reasonable. | |||
|
469 | if deltaparentrev != nullrev and debug_info is not None: | |||
470 |
|
|
470 | debug_info['denied-base-not-available'] += 1 | |
471 | debug_delta_source = "prev" |
|
|||
472 | baserev = prevrev |
|
|||
473 | else: |
|
|||
474 | if debug_info is not None: |
|
|||
475 | debug_info['denied-base-not-available'] += 1 |
|
|||
476 | debug_delta_source = "full" |
|
|||
477 | baserev = nullrev |
|
|||
478 |
|
||||
479 | # Storage has a fulltext revision. |
|
|||
480 |
|
||||
481 | # Let's use the previous revision, which is as good a guess as any. |
|
|||
482 | # There is definitely room to improve this logic. |
|
|||
483 | elif prevrev is not None: |
|
471 | elif prevrev is not None: | |
484 | if debug_info is not None: |
|
472 | if debug_info is not None: | |
485 | debug_delta_source = "prev" |
|
473 | debug_delta_source = "prev" |
General Comments 0
You need to be logged in to leave comments.
Login now