320 total = len(files) |
320 total = len(files) |
321 if total: |
321 if total: |
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): |
335 sub = ctx.workingsub(subpath) |
336 sub = ctx.workingsub(subpath) |
336 submatch = matchmod.subdirmatcher(subpath, matchfn) |
337 submatch = matchmod.subdirmatcher(subpath, matchfn) |