Patchwork [1,of,3] archival: construct progress helper through ui.makeprogress()

login
register
mail settings
Submitter Yuya Nishihara
Date Jan. 13, 2019, 6:43 a.m.
Message ID <ec7bc9f70e3982f30c28.1547361789@mimosa>
Download mbox | patch
Permalink /patch/37701/
State Accepted
Headers show

Comments

Yuya Nishihara - Jan. 13, 2019, 6:43 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1547357171 -32400
#      Sun Jan 13 14:26:11 2019 +0900
# Node ID ec7bc9f70e3982f30c2801d3af51d57c498b0851
# Parent  3f807237dc94925b7f92aeb6a822440856cc8b47
archival: construct progress helper through ui.makeprogress()

No idea why we didn't.

Patch

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -327,8 +327,8 @@  def archive(repo, dest, node, kind, deco
         files.sort()
         scmutil.prefetchfiles(repo, [ctx.rev()],
                               scmutil.matchfiles(repo, files))
-        progress = scmutil.progress(repo.ui, _('archiving'), unit=_('files'),
-                                    total=total)
+        progress = repo.ui.makeprogress(_('archiving'), unit=_('files'),
+                                        total=total)
         progress.update(0)
         for f in files:
             ff = ctx.flags(f)