518 repo.fileservice.prefetch(files) |
518 repo.fileservice.prefetch(files) |
519 return orig(repo, wctx, mctx, force, mresult, *args, **kwargs) |
519 return orig(repo, wctx, mctx, force, mresult, *args, **kwargs) |
520 |
520 |
521 |
521 |
522 # Prefetch files before status attempts to look at their size and contents |
522 # Prefetch files before status attempts to look at their size and contents |
523 def checklookup(orig, self, files): |
523 def checklookup(orig, self, files, mtime_boundary): |
524 repo = self._repo |
524 repo = self._repo |
525 if isenabled(repo): |
525 if isenabled(repo): |
526 prefetchfiles = [] |
526 prefetchfiles = [] |
527 for parent in self._parents: |
527 for parent in self._parents: |
528 for f in files: |
528 for f in files: |
529 if f in parent: |
529 if f in parent: |
530 prefetchfiles.append((f, hex(parent.filenode(f)))) |
530 prefetchfiles.append((f, hex(parent.filenode(f)))) |
531 # batch fetch the needed files from the server |
531 # batch fetch the needed files from the server |
532 repo.fileservice.prefetch(prefetchfiles) |
532 repo.fileservice.prefetch(prefetchfiles) |
533 return orig(self, files) |
533 return orig(self, files, mtime_boundary) |
534 |
534 |
535 |
535 |
536 # Prefetch the logic that compares added and removed files for renames |
536 # Prefetch the logic that compares added and removed files for renames |
537 def findrenames(orig, repo, matcher, added, removed, *args, **kwargs): |
537 def findrenames(orig, repo, matcher, added, removed, *args, **kwargs): |
538 if isenabled(repo): |
538 if isenabled(repo): |