##// END OF EJS Templates
emitrevision: if we need to compute a delta on the fly, try p1 or p2 first...
marmoute -
r50565:2fd8750f default
parent child Browse files
Show More
@@ -460,14 +460,29 b' def emitrevisions('
460 debug_delta_source = "storage"
460 debug_delta_source = "storage"
461 baserev = deltaparentrev
461 baserev = deltaparentrev
462 else:
462 else:
463 if deltaparentrev != nullrev and debug_info is not None:
464 debug_info['denied-base-not-available'] += 1
463 # No guarantee the receiver has the delta parent, or Storage has a
465 # No guarantee the receiver has the delta parent, or Storage has a
464 # fulltext revision.
466 # fulltext revision.
465 #
467 #
466 # Send delta against last revision (if possible), which in the
468 # We compute a delta on the fly to send over the wire.
467 # common case should be similar enough to this revision that the
469 #
468 # delta is reasonable.
470 # We start with a try against p1, which in the common case should
469 if deltaparentrev != nullrev and debug_info is not None:
471 # be close to this revision content.
470 debug_info['denied-base-not-available'] += 1
472 #
473 # note: we could optimize between p1 and p2 in merges cases.
474 elif is_usable_base(p1rev):
475 if debug_info is not None:
476 debug_delta_source = "p1"
477 baserev = p1rev
478 # if p1 was not an option, try p2
479 elif is_usable_base(p2rev):
480 if debug_info is not None:
481 debug_delta_source = "p2"
482 baserev = p2rev
483 # Send delta against prev in despair
484 #
485 # using the closest available ancestors first might be better?
471 elif prevrev is not None:
486 elif prevrev is not None:
472 if debug_info is not None:
487 if debug_info is not None:
473 debug_delta_source = "prev"
488 debug_delta_source = "prev"
General Comments 0
You need to be logged in to leave comments. Login now