delta-find: assume the target-rev if not specified stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 19 Apr 2023 16:59:03 +0200
branchstable
changeset 50434 ca1522fe4ec8
parent 50431 c2a1f8668606
child 50435 0232571255d3
delta-find: assume the target-rev if not specified This will be useful in the next patch, but I am putting it in its own commit to make sure we can easily bisect any subtle side effect. (none are expected, but still)
mercurial/revlogutils/deltas.py
--- a/mercurial/revlogutils/deltas.py	Thu Apr 20 09:23:58 2023 -0400
+++ b/mercurial/revlogutils/deltas.py	Wed Apr 19 16:59:03 2023 +0200
@@ -684,6 +684,9 @@
         yield None
         return
 
+    if target_rev is None:
+        target_rev = len(revlog)
+
     if (
         cachedelta is not None
         and nullrev == cachedelta[0]