##// END OF EJS Templates
export: don't prefetch *all* files in manifest...
Martin von Zweigbergk -
r42673:307f67d4 default
parent child Browse files
Show More
@@ -1668,6 +1668,14 b' def _exportfntemplate(repo, revs, basefm'
1668 _exportsingle(repo, ctx, fm, match, switch_parent, seqno,
1668 _exportsingle(repo, ctx, fm, match, switch_parent, seqno,
1669 diffopts)
1669 diffopts)
1670
1670
1671 def _prefetchchangedfiles(repo, revs, match):
1672 allfiles = set()
1673 for rev in revs:
1674 for file in repo[rev].files():
1675 if not match or match(file):
1676 allfiles.add(file)
1677 scmutil.prefetchfiles(repo, revs, scmutil.matchfiles(repo, allfiles))
1678
1671 def export(repo, revs, basefm, fntemplate='hg-%h.patch', switch_parent=False,
1679 def export(repo, revs, basefm, fntemplate='hg-%h.patch', switch_parent=False,
1672 opts=None, match=None):
1680 opts=None, match=None):
1673 '''export changesets as hg patches
1681 '''export changesets as hg patches
@@ -1692,7 +1700,7 b' def export(repo, revs, basefm, fntemplat'
1692 the given template.
1700 the given template.
1693 Otherwise: All revs will be written to basefm.
1701 Otherwise: All revs will be written to basefm.
1694 '''
1702 '''
1695 scmutil.prefetchfiles(repo, revs, match)
1703 _prefetchchangedfiles(repo, revs, match)
1696
1704
1697 if not fntemplate:
1705 if not fntemplate:
1698 _exportfile(repo, revs, basefm, '<unnamed>', switch_parent, opts, match)
1706 _exportfile(repo, revs, basefm, '<unnamed>', switch_parent, opts, match)
@@ -1702,7 +1710,7 b' def export(repo, revs, basefm, fntemplat'
1702
1710
1703 def exportfile(repo, revs, fp, switch_parent=False, opts=None, match=None):
1711 def exportfile(repo, revs, fp, switch_parent=False, opts=None, match=None):
1704 """Export changesets to the given file stream"""
1712 """Export changesets to the given file stream"""
1705 scmutil.prefetchfiles(repo, revs, match)
1713 _prefetchchangedfiles(repo, revs, match)
1706
1714
1707 dest = getattr(fp, 'name', '<unnamed>')
1715 dest = getattr(fp, 'name', '<unnamed>')
1708 with formatter.formatter(repo.ui, fp, 'export', {}) as fm:
1716 with formatter.formatter(repo.ui, fp, 'export', {}) as fm:
General Comments 0
You need to be logged in to leave comments. Login now