diff mercurial/cmdutil.py @ 35926:264b90a060b7

cat: call the storage prefetch hook It's not important to call in the case of a single file, but maybe it's better to do so for consistency.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 04 Feb 2018 15:26:49 -0500
parents efbd04238029
children 386c1e45e671
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sun Feb 04 14:31:32 2018 -0500
+++ b/mercurial/cmdutil.py	Sun Feb 04 15:26:49 2018 -0500
@@ -2188,12 +2188,16 @@
         mfnode = ctx.manifestnode()
         try:
             if mfnode and mfl[mfnode].find(file)[0]:
+                _prefetchfiles(repo, ctx, [file])
                 write(file)
                 return 0
         except KeyError:
             pass
 
-    for abs in ctx.walk(matcher):
+    files = [f for f in ctx.walk(matcher)]
+    _prefetchfiles(repo, ctx, files)
+
+    for abs in files:
         write(abs)
         err = 0