progress display tweak draft

Wed, 04 Jun 2025 21:18:16 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Wed, 04 Jun 2025 21:18:16 -0500
changeset 153
4efb3abc77f3
parent 152
52362f545be1
child 154
b2d9ceffb6f0

progress display tweak

borgend/ui.py file | annotate | diff | comparison | revisions
--- a/borgend/ui.py	Wed Jun 04 08:45:21 2025 -0500
+++ b/borgend/ui.py	Wed Jun 04 21:18:16 2025 -0500
@@ -166,16 +166,16 @@
         # Operation running
         progress=''
         d=status.detail
-        if 'progress_current' in d and 'progress_total' in d:
+        if 'original_size' in d and 'deduplicated_size' in d:
+            progress=' %s→%s' % (humanbytes(d['original_size']),
+                                 humanbytes(d['deduplicated_size']))
+        elif 'progress_current' in d and 'progress_total' in d:
             progress=progress_percentage(d['progress_current'],
                                          d['progress_total'], d)
         elif ('progress_current_secondary' in d and
               'progress_total_secondary' in d):
             progress=progress_parts(d['progress_current_secondary'],
                                     d['progress_total_secondary'], d)
-        elif 'original_size' in d and 'deduplicated_size' in d:
-            progress=' %s→%s' % (humanbytes(d['original_size']),
-                                 humanbytes(d['deduplicated_size']))
 
         howrunning = "running %s%s" % (status.type, progress)
 

mercurial