changeset 51459:e7bbeaa4f0a7 stable

delta-search: fix crash caused by unbound variable This code path was apparently not tested. This fixes a crash when cloning the Tryton repo.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 18 Mar 2024 11:25:21 +0100
parents 4976aacae424
children a2f1d97e5284
files mercurial/revlogutils/deltas.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Fri Mar 15 10:49:44 2024 +0100
+++ b/mercurial/revlogutils/deltas.py	Mon Mar 18 11:25:21 2024 +0100
@@ -876,7 +876,8 @@
             # XXX note that the ordering of the group becomes important as
             # it now impacts the final result. The current order is
             # unprocessed and can be improved.
-            next_idx = self._internal_idx + self._group_chunk_size
+            chunk_size = self.revlog.delta_config.candidate_group_chunk_size
+            next_idx = self._internal_idx + chunk_size
             self.current_group = self._internal_group[
                 self._internal_idx : next_idx
             ]