--- 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)