From patchwork Tue Feb 13 05:39:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3,of,6,V3] archive: migrate to the fileprefetch callback mechanism From: Matt Harbison X-Patchwork-Id: 27806 Message-Id: <243fe0926905286bbce9.1518500356@Envy> To: mercurial-devel@mercurial-scm.org Date: Tue, 13 Feb 2018 00:39:16 -0500 # HG changeset patch # User Matt Harbison # Date 1518328183 18000 # Sun Feb 11 00:49:43 2018 -0500 # Node ID 243fe0926905286bbce9078de38ea1565b03028a # Parent f5461e496adbb52ed35e71e8a00c9f0b6b5b9c0f archive: migrate to the fileprefetch callback mechanism diff --git a/mercurial/archival.py b/mercurial/archival.py --- a/mercurial/archival.py +++ b/mercurial/archival.py @@ -22,6 +22,7 @@ error, formatter, match as matchmod, + scmutil, util, vfs as vfsmod, ) @@ -338,7 +339,7 @@ total = len(files) if total: files.sort() - cmdutil._prefetchfiles(repo, ctx, files) + scmutil.fileprefetchhooks(repo, ctx, files) repo.ui.progress(_('archiving'), 0, unit=_('files'), total=total) for i, f in enumerate(files): ff = ctx.flags(f) diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -556,7 +556,7 @@ files = [f for f in files if match(f)] rev = self._state[1] ctx = self._repo[rev] - cmdutil._prefetchfiles(self._repo, ctx, files) + scmutil.fileprefetchhooks(self._repo, ctx, files) total = abstractsubrepo.archive(self, archiver, prefix, match) for subpath in ctx.substate: s = subrepo(ctx, subpath, True)