# HG changeset patch # User Raphaël Gomès # Date 2024-03-18 10:25:21 # Node ID e7bbeaa4f0a72d7f656b87864d0826bcd85fea26 # Parent 4976aacae424af29b6949111951132a35cf31735 delta-search: fix crash caused by unbound variable This code path was apparently not tested. This fixes a crash when cloning the Tryton repo. diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py +++ b/mercurial/revlogutils/deltas.py @@ -876,7 +876,8 @@ class _GeneralDeltaSearch(_BaseDeltaSear # 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 ]