Show More
@@ -1668,6 +1668,14 b' def _exportfntemplate(repo, revs, basefm' | |||
|
1668 | 1668 | _exportsingle(repo, ctx, fm, match, switch_parent, seqno, |
|
1669 | 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 | 1679 | def export(repo, revs, basefm, fntemplate='hg-%h.patch', switch_parent=False, |
|
1672 | 1680 | opts=None, match=None): |
|
1673 | 1681 | '''export changesets as hg patches |
@@ -1692,7 +1700,7 b' def export(repo, revs, basefm, fntemplat' | |||
|
1692 | 1700 | the given template. |
|
1693 | 1701 | Otherwise: All revs will be written to basefm. |
|
1694 | 1702 | ''' |
|
1695 |
|
|
|
1703 | _prefetchchangedfiles(repo, revs, match) | |
|
1696 | 1704 | |
|
1697 | 1705 | if not fntemplate: |
|
1698 | 1706 | _exportfile(repo, revs, basefm, '<unnamed>', switch_parent, opts, match) |
@@ -1702,7 +1710,7 b' def export(repo, revs, basefm, fntemplat' | |||
|
1702 | 1710 | |
|
1703 | 1711 | def exportfile(repo, revs, fp, switch_parent=False, opts=None, match=None): |
|
1704 | 1712 | """Export changesets to the given file stream""" |
|
1705 |
|
|
|
1713 | _prefetchchangedfiles(repo, revs, match) | |
|
1706 | 1714 | |
|
1707 | 1715 | dest = getattr(fp, 'name', '<unnamed>') |
|
1708 | 1716 | with formatter.formatter(repo.ui, fp, 'export', {}) as fm: |
General Comments 0
You need to be logged in to leave comments.
Login now