D5532: context: schedule file prefetch before comparing for cleanliness

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Wed Jan 9 15:11:02 EST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf18f665b1424: context: schedule file prefetch before comparing for cleanliness (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5532?vs=13084&id=13107

REVISION DETAIL
  https://phab.mercurial-scm.org/D5532

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2018,6 +2018,12 @@
         to resolve a conflict.
         """
         keys = []
+        # This won't be perfect, but can help performance significantly when
+        # using things like remotefilelog.
+        scmutil.prefetchfiles(
+            self.repo(), [self.p1().rev()],
+            matchmod.match('', '', patterns=self._cache.keys(), exact=True))
+
         for path in self._cache.keys():
             cache = self._cache[path]
             try:



To: spectral, #hg-reviewers
Cc: mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list