diff mercurial/match.py @ 51628:a2afa35641c9

matchers: support patternmatcher in rust
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Fri, 05 Apr 2024 17:57:26 +0100
parents ea3343104f07
children aa23b19e6da4
line wrap: on
line diff
--- a/mercurial/match.py	Tue Apr 09 11:12:24 2024 +0100
+++ b/mercurial/match.py	Fri Apr 05 17:57:26 2024 +0100
@@ -644,6 +644,11 @@
         super(patternmatcher, self).__init__(badfn)
         kindpats.sort()
 
+        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
+
         roots, dirs, parents = _rootsdirsandparents(kindpats)
         self._files = _explicitfiles(kindpats)
         self._dirs_explicit = set(dirs)