D3782: archival: use progress helper
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon Jun 18 10:24:47 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1a2ff11e8a88: archival: use progress helper (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3782?vs=9153&id=9186
REVISION DETAIL
https://phab.mercurial-scm.org/D3782
AFFECTED FILES
mercurial/archival.py
CHANGE DETAILS
diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -322,13 +322,14 @@
files.sort()
scmutil.prefetchfiles(repo, [ctx.rev()],
scmutil.matchfiles(repo, files))
- repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total)
- for i, f in enumerate(files):
+ progress = scmutil.progress(repo.ui, _('archiving'), unit=_('files'),
+ total=total)
+ progress.update(0)
+ for f in files:
ff = ctx.flags(f)
write(f, 'x' in ff and 0o755 or 0o644, 'l' in ff, ctx[f].data)
- repo.ui.progress(_('archiving'), i + 1, item=f,
- unit=_('files'), total=total)
- repo.ui.progress(_('archiving'), None)
+ progress.increment(item=f)
+ progress.complete()
if subrepos:
for subpath in sorted(ctx.substate):
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list