Patchwork D7872: lfs: add "bytes" as the unit to the upload/download progress bar

login
register
mail settings
Submitter phabricator
Date Jan. 14, 2020, 5:47 p.m.
Message ID <differential-rev-PHID-DREV-geeftthbe5noj7c6c7qx-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44338/
State Superseded
Headers show

Comments

phabricator - Jan. 14, 2020, 5:47 p.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Facebook also passes `util.bytecount()` as a pretty formatter here, but our
  progress bar doesn't support that.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7872

AFFECTED FILES
  hgext/lfs/blobstore.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py
+++ b/hgext/lfs/blobstore.py
@@ -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