1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-21 23:33:07 +00:00

use stable chunkindex list order

This commit is contained in:
Thomas Waldmann 2024-11-08 19:43:44 +01:00
parent d4310dd4cf
commit 4a6fcc26d7
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -681,12 +681,13 @@ def try_upgrade_to_b14(repository):
def list_chunkindex_hashes(repository):
hashes = set()
hashes = []
for info in repository.store_list("cache"):
info = ItemInfo(*info) # RPC does not give namedtuple
if info.name.startswith("chunks."):
hash = info.name.removeprefix("chunks.")
hashes.add(hash)
hashes.append(hash)
hashes = sorted(hashes)
logger.debug(f"cached chunk indexes: {hashes}")
return hashes