Patchwork D5373: debugbuildannotatecache: use progress helper

login
register
mail settings
Submitter phabricator
Date Dec. 6, 2018, 11:41 a.m.
Message ID <10802b9e91985dcd51d3d21179613ddf@localhost.localdomain>
Download mbox | patch
Permalink /patch/37003/
State Not Applicable
Headers show

Comments

phabricator - Dec. 6, 2018, 11:41 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG901f6ef670ca: debugbuildannotatecache: use progress helper (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5373?vs=12712&id=12734

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

AFFECTED FILES
  hgext/fastannotate/commands.py

CHANGE DETAILS




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

Patch

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 @@ 
         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 @@ 
                         # cache for other files.
                         ui.warn(_('fastannotate: %s: failed to '
                                   'build cache: %r\n') % (path, ex))
-        # clear the progress bar
-        ui.write()
+        progress.complete()