# HG changeset patch # User Martin von Zweigbergk # Date 2018-12-04 23:57:11 # Node ID 901f6ef670ca5e1a9ed07f31aed4e1930982688d # Parent 64051af155963de2a527d4013ad281dbd6ef8d15 debugbuildannotatecache: use progress helper Differential Revision: https://phab.mercurial-scm.org/D5373 diff --git a/hgext/fastannotate/commands.py b/hgext/fastannotate/commands.py --- a/hgext/fastannotate/commands.py +++ b/hgext/fastannotate/commands.py @@ -261,8 +261,9 @@ def debugbuildannotatecache(ui, repo, *p repo.prefetchfastannotate(paths) else: # server, or full repo + progress = ui.makeprogress(_('building'), total=len(paths)) for i, path in enumerate(paths): - ui.progress(_('building'), i, total=len(paths)) + progress.update(i) with facontext.annotatecontext(repo, path) as actx: try: if actx.isuptodate(rev): @@ -281,5 +282,4 @@ def debugbuildannotatecache(ui, repo, *p # cache for other files. ui.warn(_('fastannotate: %s: failed to ' 'build cache: %r\n') % (path, ex)) - # clear the progress bar - ui.write() + progress.complete()