Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 45073: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 |
comparison
equal
deleted
inserted
replaced
45072:196ba4d4eb86 | 45073:a56ba57c837d |
---|---|
2538 keys = [] | 2538 keys = [] |
2539 # This won't be perfect, but can help performance significantly when | 2539 # This won't be perfect, but can help performance significantly when |
2540 # using things like remotefilelog. | 2540 # using things like remotefilelog. |
2541 scmutil.prefetchfiles( | 2541 scmutil.prefetchfiles( |
2542 self.repo(), | 2542 self.repo(), |
2543 [self.p1().rev()], | 2543 [ |
2544 scmutil.matchfiles(self.repo(), self._cache.keys()), | 2544 ( |
2545 self.p1().rev(), | |
2546 scmutil.matchfiles(self.repo(), self._cache.keys()), | |
2547 ) | |
2548 ], | |
2545 ) | 2549 ) |
2546 | 2550 |
2547 for path in self._cache.keys(): | 2551 for path in self._cache.keys(): |
2548 cache = self._cache[path] | 2552 cache = self._cache[path] |
2549 try: | 2553 try: |