Skip to content
Snippets Groups Projects
Commit f1b57672 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

delta-find: remove dead code intended to deal with forced delta reuse

Since the case was dealt with sooner (see XXX), we no longer need to deal with
it in this part of the code.
parent e7ef11b7
No related branches found
No related tags found
2 merge requests!618Draft: 6.5rc0,!610cleanup delta finding code
......@@ -585,12 +585,14 @@
if deltainfo is None:
return False
if (
revinfo.cachedelta is not None
and deltainfo.base == revinfo.cachedelta[0]
and revinfo.cachedelta[2] == DELTA_BASE_REUSE_FORCE
):
return True
# the DELTA_BASE_REUSE_FORCE case should have been taken care of sooner so
# we should never end up asking such question. Adding the assert as a
# safe-guard to detect anything that would be fishy in this regard.
assert (
revinfo.cachedelta is None
or revinfo.cachedelta[2] != DELTA_BASE_REUSE_FORCE
or not revlog._generaldelta
)
# - 'deltainfo.distance' is the distance from the base revision --
# bounding it limits the amount of I/O we need to do.
......@@ -693,14 +695,14 @@
yield None
return
if (
cachedelta is not None
and nullrev == cachedelta[0]
and cachedelta[2] == DELTA_BASE_REUSE_FORCE
):
# instruction are to forcibly do a full snapshot
yield None
return
# the DELTA_BASE_REUSE_FORCE case should have been taken care of sooner so
# we should never end up asking such question. Adding the assert as a
# safe-guard to detect anything that would be fishy in this regard.
assert (
cachedelta is None
or cachedelta[2] != DELTA_BASE_REUSE_FORCE
or not revlog._generaldelta
)
deltalength = revlog.length
deltaparent = revlog.deltaparent
......@@ -736,15 +738,6 @@
if rev in tested:
continue
if (
cachedelta is not None
and rev == cachedelta[0]
and cachedelta[2] == DELTA_BASE_REUSE_FORCE
):
# instructions are to forcibly consider/use this delta base
group.append(rev)
continue
# an higher authority deamed the base unworthy (e.g. censored)
if excluded_bases is not None and rev in excluded_bases:
tested.add(rev)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment