Jelajahi Sumber

fix ProgressIndicator msgids, fixes #4935

add some to code, fix docs.
Thomas Waldmann 5 tahun lalu
induk
melakukan
a8831f4978
3 mengubah file dengan 8 tambahan dan 3 penghapusan
  1. 5 1
      docs/internals/frontends.rst
  2. 2 1
      src/borg/archive.py
  3. 1 1
      src/borg/upgrader.py

+ 5 - 1
docs/internals/frontends.rst

@@ -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

+ 2 - 1
src/borg/archive.py

@@ -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)

+ 1 - 1
src/borg/upgrader.py

@@ -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)