comparison mercurial/patch.py @ 45072:a56ba57c837d

scmutil: allowing different files to be prefetched per revision The old API takes a list of revision separate from the file matcher, and thus provides no way to fetch different sets of files from each revision. In preparation for adding one such usage, I'm changing the API to take a list of (revision, file matcher) tuples instead. Differential Revision: https://phab.mercurial-scm.org/D8721
author Rodrigo Damazio Bovendorp <rdamazio@google.com>
date Thu, 09 Jul 2020 18:48:55 -0700
parents e58422afbc74
children 20a65e397943
comparison
equal deleted inserted replaced
45071:196ba4d4eb86 45072:a56ba57c837d
2664 del copy[dst] 2664 del copy[dst]
2665 2665
2666 prefetchmatch = scmutil.matchfiles( 2666 prefetchmatch = scmutil.matchfiles(
2667 repo, list(modifiedset | addedset | removedset) 2667 repo, list(modifiedset | addedset | removedset)
2668 ) 2668 )
2669 scmutil.prefetchfiles(repo, [ctx1.rev(), ctx2.rev()], prefetchmatch) 2669 revmatches = [
2670 (ctx1.rev(), prefetchmatch),
2671 (ctx2.rev(), prefetchmatch),
2672 ]
2673 scmutil.prefetchfiles(repo, revmatches)
2670 2674
2671 def difffn(opts, losedata): 2675 def difffn(opts, losedata):
2672 return trydiff( 2676 return trydiff(
2673 repo, 2677 repo,
2674 revs, 2678 revs,