Patchwork [4,of,6,V3] cat: migrate to the fileprefetch callback mechanism

login
register
mail settings
Submitter Matt Harbison
Date Feb. 13, 2018, 5:39 a.m.
Message ID <c63a31b38a09c007b3e4.1518500357@Envy>
Download mbox | patch
Permalink /patch/27807/
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 1518328282 18000
#      Sun Feb 11 00:51:22 2018 -0500
# Node ID c63a31b38a09c007b3e4e7f09de8c3b591b55d0b
# Parent  243fe0926905286bbce9078de38ea1565b03028a
cat: migrate to the fileprefetch callback mechanism

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2187,14 +2187,14 @@ 
         mfnode = ctx.manifestnode()
         try:
             if mfnode and mfl[mfnode].find(file)[0]:
-                _prefetchfiles(repo, ctx, [file])
+                scmutil.fileprefetchhooks(repo, ctx, [file])
                 write(file)
                 return 0
         except KeyError:
             pass
 
     files = [f for f in ctx.walk(matcher)]
-    _prefetchfiles(repo, ctx, files)
+    scmutil.fileprefetchhooks(repo, ctx, files)
 
     for abs in files:
         write(abs)