Mercurial > hg-stable
changeset 38411:76a08cec029d
lfs: use progess helper
Differential Revision: https://phab.mercurial-scm.org/D3806
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 18 Jun 2018 14:59:53 -0700 |
parents | 398716063c2d |
children | 65d1d7da63d1 |
files | hgext/lfs/blobstore.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/lfs/blobstore.py Mon Jun 18 14:52:41 2018 -0700 +++ b/hgext/lfs/blobstore.py Mon Jun 18 14:59:53 2018 -0700 @@ -405,7 +405,8 @@ if len(objects) > 1: self.ui.note(_('lfs: need to transfer %d objects (%s)\n') % (len(objects), util.bytecount(total))) - self.ui.progress(topic, 0, total=total) + progress = self.ui.makeprogress(topic, total=total) + progress.update(0) def transfer(chunk): for obj in chunk: objsize = obj.get('size', 0) @@ -443,9 +444,9 @@ for _one, oid in oids: processed += sizes[oid] blobs += 1 - self.ui.progress(topic, processed, total=total) + progress.update(processed) self.ui.note(_('lfs: processed: %s\n') % oid) - self.ui.progress(topic, pos=None, total=total) + progress.complete() if blobs > 0: if action == 'upload':