diff mercurial/context.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 4c1d39215034
children 83f75f1efdcc
line wrap: on
line diff
--- a/mercurial/context.py	Sat Jul 11 00:31:21 2020 +0530
+++ b/mercurial/context.py	Thu Jul 09 18:48:55 2020 -0700
@@ -2540,8 +2540,12 @@
         # using things like remotefilelog.
         scmutil.prefetchfiles(
             self.repo(),
-            [self.p1().rev()],
-            scmutil.matchfiles(self.repo(), self._cache.keys()),
+            [
+                (
+                    self.p1().rev(),
+                    scmutil.matchfiles(self.repo(), self._cache.keys()),
+                )
+            ],
         )
 
         for path in self._cache.keys():