##// END OF EJS Templates
emitrevision: simplify the fallback to computed delta...
marmoute -
r50682:bb2c663c stable
parent child Browse files
Show More
@@ -430,24 +430,16 b' def emitrevisions('
430 # There is a delta in storage. We try to use that because it
430 # There is a delta in storage. We try to use that because it
431 # amounts to effectively copying data from storage and is
431 # amounts to effectively copying data from storage and is
432 # therefore the fastest.
432 # therefore the fastest.
433 elif deltaparentrev != nullrev:
433 elif is_usable_base(deltaparentrev):
434 # If the stored delta works, let us use it !
435 if is_usable_base(deltaparentrev):
436 baserev = deltaparentrev
434 baserev = deltaparentrev
437 # No guarantee the receiver has the delta parent. Send delta
438 # against last revision (if possible), which in the common case
439 # should be similar enough to this revision that the delta is
440 # reasonable.
441 elif prevrev is not None:
442 baserev = prevrev
443 else:
435 else:
444 baserev = nullrev
436 # No guarantee the receiver has the delta parent, or Storage has a
445
437 # fulltext revision.
446 # Storage has a fulltext revision.
438 #
447
439 # Send delta against last revision (if possible), which in the
448 # Let's use the previous revision, which is as good a guess as any.
440 # common case should be similar enough to this revision that the
449 # There is definitely room to improve this logic.
441 # delta is reasonable.
450 elif prevrev is not None:
442 if prevrev is not None:
451 baserev = prevrev
443 baserev = prevrev
452 else:
444 else:
453 baserev = nullrev
445 baserev = nullrev
General Comments 0
You need to be logged in to leave comments. Login now