Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
37762:7269b87f817c | 37763:b54404d66f7e |
---|---|
1622 destinations: | 1622 destinations: |
1623 fntemplate specified: Each rev is written to a unique file named using | 1623 fntemplate specified: Each rev is written to a unique file named using |
1624 the given template. | 1624 the given template. |
1625 Otherwise: All revs will be written to basefm. | 1625 Otherwise: All revs will be written to basefm. |
1626 ''' | 1626 ''' |
1627 scmutil.prefetchfiles(repo, revs, match) | |
1628 | |
1627 if not fntemplate: | 1629 if not fntemplate: |
1628 _exportfile(repo, revs, basefm, '<unnamed>', switch_parent, opts, match) | 1630 _exportfile(repo, revs, basefm, '<unnamed>', switch_parent, opts, match) |
1629 else: | 1631 else: |
1630 _exportfntemplate(repo, revs, basefm, fntemplate, switch_parent, opts, | 1632 _exportfntemplate(repo, revs, basefm, fntemplate, switch_parent, opts, |
1631 match) | 1633 match) |
1632 | 1634 |
1633 def exportfile(repo, revs, fp, switch_parent=False, opts=None, match=None): | 1635 def exportfile(repo, revs, fp, switch_parent=False, opts=None, match=None): |
1634 """Export changesets to the given file stream""" | 1636 """Export changesets to the given file stream""" |
1637 scmutil.prefetchfiles(repo, revs, match) | |
1638 | |
1635 dest = getattr(fp, 'name', '<unnamed>') | 1639 dest = getattr(fp, 'name', '<unnamed>') |
1636 with formatter.formatter(repo.ui, fp, 'export', {}) as fm: | 1640 with formatter.formatter(repo.ui, fp, 'export', {}) as fm: |
1637 _exportfile(repo, revs, fm, dest, switch_parent, opts, match) | 1641 _exportfile(repo, revs, fm, dest, switch_parent, opts, match) |
1638 | 1642 |
1639 def showmarker(fm, marker, index=None): | 1643 def showmarker(fm, marker, index=None): |