changeset 44077:05881d002cb2

lfs: add "bytes" as the unit to the upload/download progress bar Facebook also passes `util.bytecount()` as a pretty formatter here, but our progress bar doesn't support that. Differential Revision: https://phab.mercurial-scm.org/D7872
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 14 Jan 2020 00:52:53 -0500
parents a7c4bcf7018a
children f2c350e7371e
files hgext/lfs/blobstore.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/lfs/blobstore.py	Tue Jan 14 16:37:45 2020 -0500
+++ b/hgext/lfs/blobstore.py	Tue Jan 14 00:52:53 2020 -0500
@@ -588,7 +588,9 @@
         else:
             oids = transfer(sorted(objects, key=lambda o: o.get(b'oid')))
 
-        with self.ui.makeprogress(topic, total=total) as progress:
+        with self.ui.makeprogress(
+            topic, unit=_(b"bytes"), total=total
+        ) as progress:
             progress.update(0)
             processed = 0
             blobs = 0