diff 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
line wrap: on
line diff
--- a/mercurial/patch.py	Sat Jul 11 00:31:21 2020 +0530
+++ b/mercurial/patch.py	Thu Jul 09 18:48:55 2020 -0700
@@ -2666,7 +2666,11 @@
     prefetchmatch = scmutil.matchfiles(
         repo, list(modifiedset | addedset | removedset)
     )
-    scmutil.prefetchfiles(repo, [ctx1.rev(), ctx2.rev()], prefetchmatch)
+    revmatches = [
+        (ctx1.rev(), prefetchmatch),
+        (ctx2.rev(), prefetchmatch),
+    ]
+    scmutil.prefetchfiles(repo, revmatches)
 
     def difffn(opts, losedata):
         return trydiff(