# HG changeset patch # User Arseniy Alekseyev # Date 1714155035 -3600 # Node ID 865efc020c3355dca1cbaa35db80600009c01dd5 # Parent aa23b19e6da46dfed98f59fe47d5fa34f379e624 dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior. diff -r aa23b19e6da4 -r 865efc020c33 mercurial/dirstate.py --- a/mercurial/dirstate.py Fri Apr 26 18:53:02 2024 +0100 +++ b/mercurial/dirstate.py Fri Apr 26 19:10:35 2024 +0100 @@ -1639,16 +1639,6 @@ use_rust = True - allowed_matchers = ( - matchmod.alwaysmatcher, - matchmod.differencematcher, - matchmod.exactmatcher, - matchmod.includematcher, - matchmod.intersectionmatcher, - matchmod.nevermatcher, - matchmod.unionmatcher, - ) - if rustmod is None: use_rust = False elif self._checkcase: @@ -1656,9 +1646,6 @@ use_rust = False elif subrepos: use_rust = False - elif not isinstance(match, allowed_matchers): - # Some matchers have yet to be implemented - use_rust = False # Get the time from the filesystem so we can disambiguate files that # appear modified in the present or future.