##// END OF EJS Templates
emitrevision: add a small closure to check if a base is usable...
marmoute -
r50562:191f5057 default
parent child Browse files
Show More
@@ -396,6 +396,9 b' def emitrevisions('
396 # Set of revs available to delta against.
396 # Set of revs available to delta against.
397 available = set()
397 available = set()
398
398
399 def is_usable_base(rev):
400 return rev != nullrev and rev in available
401
399 for rev in revs:
402 for rev in revs:
400 if rev == nullrev:
403 if rev == nullrev:
401 continue
404 continue
@@ -445,7 +448,7 b' def emitrevisions('
445 elif deltaparentrev != nullrev:
448 elif deltaparentrev != nullrev:
446 # Base revision was already emitted in this group. We can
449 # Base revision was already emitted in this group. We can
447 # always safely use the delta.
450 # always safely use the delta.
448 if deltaparentrev in available:
451 if is_usable_base(deltaparentrev):
449 if debug_info is not None:
452 if debug_info is not None:
450 debug_delta_source = "storage"
453 debug_delta_source = "storage"
451 baserev = deltaparentrev
454 baserev = deltaparentrev
General Comments 0
You need to be logged in to leave comments. Login now