##// END OF EJS Templates
archival: use progress helper...
Martin von Zweigbergk -
r38400:1a2ff11e default
parent child Browse files
Show More
@@ -322,13 +322,14 b' def archive(repo, dest, node, kind, deco'
322 files.sort()
322 files.sort()
323 scmutil.prefetchfiles(repo, [ctx.rev()],
323 scmutil.prefetchfiles(repo, [ctx.rev()],
324 scmutil.matchfiles(repo, files))
324 scmutil.matchfiles(repo, files))
325 repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total)
325 progress = scmutil.progress(repo.ui, _('archiving'), unit=_('files'),
326 for i, f in enumerate(files):
326 total=total)
327 progress.update(0)
328 for f in files:
327 ff = ctx.flags(f)
329 ff = ctx.flags(f)
328 write(f, 'x' in ff and 0o755 or 0o644, 'l' in ff, ctx[f].data)
330 write(f, 'x' in ff and 0o755 or 0o644, 'l' in ff, ctx[f].data)
329 repo.ui.progress(_('archiving'), i + 1, item=f,
331 progress.increment(item=f)
330 unit=_('files'), total=total)
332 progress.complete()
331 repo.ui.progress(_('archiving'), None)
332
333
333 if subrepos:
334 if subrepos:
334 for subpath in sorted(ctx.substate):
335 for subpath in sorted(ctx.substate):
General Comments 0
You need to be logged in to leave comments. Login now