Mercurial > hg-stable
changeset 43923:40fd1ef4e4c1
rust-matchers: add support for `exactmatcher` in `dirstate.status`
`exactmatcher` is the name in the Python implementation and corresponds to
`FileMatcher` in Rust.
Differential Revision: https://phab.mercurial-scm.org/D7531
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Fri, 29 Nov 2019 17:30:57 +0100 |
parents | 6a88ced33c40 |
children | 86fe85364811 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Fri Nov 29 17:30:10 2019 +0100 +++ b/mercurial/dirstate.py Fri Nov 29 17:30:57 2019 +0100 @@ -1107,11 +1107,14 @@ dmap.preload() use_rust = True + + allowed_matchers = (matchmod.alwaysmatcher, matchmod.exactmatcher) + if rustmod is None: use_rust = False elif subrepos: use_rust = False - if bool(listunknown): + elif bool(listunknown): # Pathauditor does not exist yet in Rust, unknown files # can't be trusted. use_rust = False @@ -1119,7 +1122,7 @@ # Rust has no ignore mechanism yet, so don't use Rust for # commands that need ignore. use_rust = False - elif not match.always(): + elif not isinstance(match, allowed_matchers): # Matchers have yet to be implemented use_rust = False @@ -1147,6 +1150,7 @@ clean, ) = rustmod.status( dmap._rustmap, + match, self._rootdir, bool(listclean), self._lastnormaltime,