Merge pull request #9601 from ThomasWaldmann/prune-stats-enhancement-1.4
Some checks are pending
CI / lint (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run
Windows CI / msys2-ucrt64 (push) Waiting to run

prune: show total vs matching archives in output, fixes #9262
This commit is contained in:
TW 2026-05-12 14:08:33 +02:00 committed by GitHub
commit bc7814a677
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1669,7 +1669,16 @@ class Archiver:
to_delete = (set(archives) | checkpoints) - (set(keep) | set(keep_checkpoints))
pruned_checkpoints_len = len(set(checkpoints) - set(keep_checkpoints))
pruned_archives_len = len(to_delete) - pruned_checkpoints_len
logger.info('Found %d normal archives and %d checkpoint archives.',
total_archives_count = 0
total_checkpoints_count = 0
for name in manifest.archives:
if is_checkpoint(name):
total_checkpoints_count += 1
else:
total_archives_count += 1
logger.info('Repository contains %d normal archives and %d checkpoint archives.',
total_archives_count, total_checkpoints_count)
logger.info('Applying rules to the matching %d archives and %d checkpoints...',
len(archives), len(checkpoints))
logger.info('Keeping %d archives and %d checkpoints, pruning %d archives and %d checkpoints.',
len(keep), len(keep_checkpoints), pruned_archives_len, pruned_checkpoints_len)