Mercurial > public > mercurial-scm > hg
diff rust/hg-cpython/src/dirstate/status.rs @ 49351:97dcd6906e6f
rust-dirstate: add support for nevermatcher
This is in case this ever comes up, it's very easy to support, so might as well
do it.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 08 Jun 2022 18:18:19 +0200 |
parents | 0b00998e336a |
children | 6193e846cb65 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/status.rs Wed Jun 08 18:12:55 2022 +0200 +++ b/rust/hg-cpython/src/dirstate/status.rs Wed Jun 08 18:18:19 2022 +0200 @@ -15,7 +15,7 @@ PyResult, PyTuple, Python, PythonObject, ToPyObject, }; use hg::dirstate::status::StatusPath; -use hg::matchers::{Matcher, UnionMatcher, IntersectionMatcher}; +use hg::matchers::{IntersectionMatcher, Matcher, NeverMatcher, UnionMatcher}; use hg::{ matchers::{AlwaysMatcher, FileMatcher, IncludeMatcher}, parse_pattern_syntax, @@ -158,6 +158,7 @@ ) -> PyResult<Box<dyn Matcher + Sync>> { match matcher.get_type(py).name(py).borrow() { "alwaysmatcher" => Ok(Box::new(AlwaysMatcher)), + "nevermatcher" => Ok(Box::new(NeverMatcher)), "exactmatcher" => { let files = matcher.call_method( py,