D7872: lfs: add "bytes" as the unit to the upload/download progress bar
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Tue Jan 14 17:47:29 UTC 2020
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
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
To: mharbison72, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list