diff mercurial/match.py @ 44540:4d1634e59f13

rust-status: use bare hg status fastpath from Python This change also adds a test case for subrepos. Repeating the benchmark information from the `hg-core` commit: On the Netbeans repository: C: 840ms Rust+C: 556ms Mozilla Central with the one pattern that causes a fallback removed: C: 2.315s Rust+C: 1.700s Differential Revision: https://phab.mercurial-scm.org/D7931
author Rapha?l Gom?s <rgomes@octobus.net>
date Fri, 24 Jan 2020 11:06:01 +0100
parents 9d2b2df2c2ba
children d2e1dcd4490d
line wrap: on
line diff
--- a/mercurial/match.py	Fri Jan 17 15:09:02 2020 +0100
+++ b/mercurial/match.py	Fri Jan 24 11:06:01 2020 +0100
@@ -666,7 +666,10 @@
 class includematcher(basematcher):
     def __init__(self, root, kindpats, badfn=None):
         super(includematcher, self).__init__(badfn)
-
+        if rustmod is not None:
+            # We need to pass the patterns to Rust because they can contain
+            # patterns from the user interface
+            self._kindpats = kindpats
         self._pats, self.matchfn = _buildmatch(kindpats, b'(?:/|$)', root)
         self._prefix = _prefix(kindpats)
         roots, dirs, parents = _rootsdirsandparents(kindpats)