Dulwich.io dulwich / 8f0ed17
Fix another race condition in pack handling. Jelmer Vernooń≥ 13 days ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
404404 old_packs = {p.name(): p for p in self.packs}
405405 for name, pack in old_packs.items():
406406 objects.update((obj, None) for obj in pack.iterobjects())
407 self._clear_cached_packs()
408407
409408 # The name of the consolidated pack might match the name of a
410409 # pre-existing pack. Take care not to remove the newly created
617616 def _remove_pack(self, pack):
618617 os.remove(pack.data.path)
619618 os.remove(pack.index.path)
619 try:
620 del self._pack_cache[os.path.basename(pack._basename)]
621 except KeyError:
622 pass
620623
621624 def _get_pack_basepath(self, entries):
622625 suffix = iter_sha1(entry[0] for entry in entries)