Mercurial > hg-stable
changeset 38400:f0b0c853f598
repair: use progress helper
Differential Revision: https://phab.mercurial-scm.org/D3795
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 17 Jun 2018 23:13:03 -0700 |
parents | 5f9d436cd3b7 |
children | 59c9d3cc810f |
files | mercurial/repair.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/repair.py Sun Jun 17 23:11:06 2018 -0700 +++ b/mercurial/repair.py Sun Jun 17 23:13:03 2018 -0700 @@ -355,10 +355,10 @@ newentries = set() seenfiles = set() - repolen = len(repo) + progress = ui.makeprogress(_('rebuilding'), unit=_('changesets'), + total=len(repo)) for rev in repo: - ui.progress(_('rebuilding'), rev, total=repolen, - unit=_('changesets')) + progress.update(rev) ctx = repo[rev] for f in ctx.files(): @@ -375,7 +375,7 @@ if repo.store._exists(d): newentries.add(d) - ui.progress(_('rebuilding'), None) + progress.complete() if 'treemanifest' in repo.requirements: # safe but unnecessary otherwise for dir in util.dirs(seenfiles):