comparison mercurial/revlogutils/deltas.py @ 51509: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 99869dcf3ba0
children
comparison
equal deleted inserted replaced
51507:4976aacae424 51509:e7bbeaa4f0a7
874 # candidates). 874 # candidates).
875 # 875 #
876 # XXX note that the ordering of the group becomes important as 876 # XXX note that the ordering of the group becomes important as
877 # it now impacts the final result. The current order is 877 # it now impacts the final result. The current order is
878 # unprocessed and can be improved. 878 # unprocessed and can be improved.
879 next_idx = self._internal_idx + self._group_chunk_size 879 chunk_size = self.revlog.delta_config.candidate_group_chunk_size
880 next_idx = self._internal_idx + chunk_size
880 self.current_group = self._internal_group[ 881 self.current_group = self._internal_group[
881 self._internal_idx : next_idx 882 self._internal_idx : next_idx
882 ] 883 ]
883 self.tested.update(self.current_group) 884 self.tested.update(self.current_group)
884 self._internal_idx = next_idx 885 self._internal_idx = next_idx