Patchwork [3,of,6] archive: migrate to the fileprefetch callback mechanism

login
register
mail settings
Submitter Matt Harbison
Date Feb. 11, 2018, 8:30 p.m.
Message ID <e4d461d1b9d71253a456.1518381016@Envy>
Download mbox | patch
Permalink /patch/27579/
State Superseded
Headers show

Comments

Matt Harbison - Feb. 11, 2018, 8:30 p.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1518328183 18000
#      Sun Feb 11 00:49:43 2018 -0500
# Node ID e4d461d1b9d71253a4563cc6ed7401b6bad32764
# Parent  878c64ac2f7631e6cbf03c7e2a500d52211e2293
archive: migrate to the fileprefetch callback mechanism

Patch

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -338,7 +338,7 @@ 
     total = len(files)
     if total:
         files.sort()
-        cmdutil._prefetchfiles(repo, ctx, files)
+        cmdutil.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
@@ -924,7 +924,7 @@ 
             files = [f for f in files if match(f)]
         rev = self._state[1]
         ctx = self._repo[rev]
-        cmdutil._prefetchfiles(self._repo, ctx, files)
+        cmdutil.fileprefetchhooks(self._repo, ctx, files)
         total = abstractsubrepo.archive(self, archiver, prefix, match)
         for subpath in ctx.substate:
             s = subrepo(ctx, subpath, True)