fix ProgressIndicator msgids, fixes #4935

add some to code, fix docs.
This commit is contained in:
Thomas Waldmann 2020-02-29 20:39:27 +01:00
parent 0a4cc48735
commit a8831f4978
3 changed files with 8 additions and 3 deletions

View File

@ -549,13 +549,17 @@ Operations
*info* is one string element, the name of the archive currently synced.
- repository.compact_segments
- repository.replay_segments
- repository.check_segments
- repository.check
- check.verify_data
- check.rebuild_manifest
- extract
*info* is one string element, the name of the path currently extracted.
- extract.permissions
- archive.delete
- archive.calc_stats
- prune
- upgrade.convert_segments
Prompts
BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK

View File

@ -596,7 +596,8 @@ Utilization of max. archive size: {csize_max:.0%}
archive_index = ChunkIndex()
sync = CacheSynchronizer(archive_index)
add(self.id)
pi = ProgressIndicatorPercent(total=len(self.metadata.items), msg='Calculating statistics... %3d%%')
pi = ProgressIndicatorPercent(total=len(self.metadata.items), msg='Calculating statistics... %3d%%',
msgid='archive.calc_stats')
for id, chunk in zip(self.metadata.items, self.repository.get_many(self.metadata.items)):
pi.show(increase=1)
add(id)

View File

@ -79,7 +79,7 @@ class AtticRepositoryUpgrader(Repository):
replace the 8 first bytes of all regular files in there."""
logger.info("converting %d segments..." % len(segments))
segment_count = len(segments)
pi = ProgressIndicatorPercent(total=segment_count, msg="Converting segments %3.0f%%")
pi = ProgressIndicatorPercent(total=segment_count, msg="Converting segments %3.0f%%", msgid='upgrade.convert_segments')
for i, filename in enumerate(segments):
if progress:
pi.show(i)