diff mercurial/cmdutil.py @ 37763:b54404d66f7e

export: invoke the file prefetch hook cmdutil.exportfile() is only called by shelve, mq and patchbomb. Those are unlikely to mix with lfs, but it may as well be invoked there for completeness.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 14 Apr 2018 19:43:45 -0400
parents 7269b87f817c
children d6970628b95f
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Sat Apr 14 18:50:45 2018 -0400
+++ b/mercurial/cmdutil.py	Sat Apr 14 19:43:45 2018 -0400
@@ -1624,6 +1624,8 @@
                             the given template.
         Otherwise: All revs will be written to basefm.
     '''
+    scmutil.prefetchfiles(repo, revs, match)
+
     if not fntemplate:
         _exportfile(repo, revs, basefm, '<unnamed>', switch_parent, opts, match)
     else:
@@ -1632,6 +1634,8 @@
 
 def exportfile(repo, revs, fp, switch_parent=False, opts=None, match=None):
     """Export changesets to the given file stream"""
+    scmutil.prefetchfiles(repo, revs, match)
+
     dest = getattr(fp, 'name', '<unnamed>')
     with formatter.formatter(repo.ui, fp, 'export', {}) as fm:
         _exportfile(repo, revs, fm, dest, switch_parent, opts, match)