Patchwork [5,of,6,V3] revert: drop the remnant of the prefetchfiles hook

login
register
mail settings
Submitter Matt Harbison
Date Feb. 13, 2018, 5:39 a.m.
Message ID <b5f3a374445c80e06085.1518500358@Envy>
Download mbox | patch
Permalink /patch/27808/
State Accepted
Headers show

Comments

Matt Harbison - Feb. 13, 2018, 5:39 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1518327627 18000
#      Sun Feb 11 00:40:27 2018 -0500
# Node ID b5f3a374445c80e0608566537e989c543b9c7046
# Parent  c63a31b38a09c007b3e4e7f09de8c3b591b55d0b
revert: drop the remnant of the prefetchfiles hook

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2871,8 +2871,8 @@ 
                 _revertprefetch(repo, ctx,
                                 *[actions[name][0] for name in needdata])
             oplist = [actions[name][0] for name in needdata]
-            _prefetchfiles(repo, ctx,
-                           [f for sublist in oplist for f in sublist])
+            prefetch = scmutil.fileprefetchhooks
+            prefetch(repo, ctx, [f for sublist in oplist for f in sublist])
             _performrevert(repo, parents, ctx, actions, interactive, tobackup)
 
         if targetsubs:
@@ -2891,11 +2891,6 @@ 
 
 _revertprefetch = _revertprefetchstub
 
-def _prefetchfiles(repo, ctx, files):
-    """Let extensions changing the storage layer prefetch content for any non
-    merge based command."""
-    scmutil.fileprefetchhooks(repo, ctx, files)
-
 def _performrevert(repo, parents, ctx, actions, interactive=False,
                    tobackup=None):
     """function that actually perform all the actions computed for revert