diff mercurial/revlogutils/constants.py @ 49791:05db41701ece

find-delta: pass the cache-delta usage policy alongside the cache-delta The idea is to give higher level code more control to what will happens with the cache delta passed. This should help with controling how we treat delta's from different sources. The final goal of this change is to allow for server modes where the client can blindly accept any server delta without regards to any local constraints. This will be implemented in later changesets.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 07 Nov 2022 22:12:59 -0500
parents 6000f5b25c9b
children bcae90c53def
line wrap: on
line diff
--- a/mercurial/revlogutils/constants.py	Mon Nov 28 18:58:35 2022 +0100
+++ b/mercurial/revlogutils/constants.py	Mon Nov 07 22:12:59 2022 -0500
@@ -301,3 +301,17 @@
 
 
 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000
+
+### What should be done with a cached delta and its base ?
+
+# Ignore the cache when considering candidates.
+#
+# The cached delta might be used, but the delta base will not be scheduled for
+# usage earlier than in "normal" order.
+DELTA_BASE_REUSE_NO = 0
+
+# Prioritize trying the cached delta base
+#
+# The delta base will be tested for validy first. So that the cached deltas get
+# used when possible.
+DELTA_BASE_REUSE_TRY = 1