Show More
@@ -1287,6 +1287,7 b' class dirstate:' | |||
|
1287 | 1287 | |
|
1288 | 1288 | allowed_matchers = ( |
|
1289 | 1289 | matchmod.alwaysmatcher, |
|
1290 | matchmod.differencematcher, | |
|
1290 | 1291 | matchmod.exactmatcher, |
|
1291 | 1292 | matchmod.includematcher, |
|
1292 | 1293 | matchmod.intersectionmatcher, |
@@ -15,7 +15,10 b' use cpython::{' | |||
|
15 | 15 | PyResult, PyTuple, Python, PythonObject, ToPyObject, |
|
16 | 16 | }; |
|
17 | 17 | use hg::dirstate::status::StatusPath; |
|
18 | use hg::matchers::{IntersectionMatcher, Matcher, NeverMatcher, UnionMatcher}; | |
|
18 | use hg::matchers::{ | |
|
19 | DifferenceMatcher, IntersectionMatcher, Matcher, NeverMatcher, | |
|
20 | UnionMatcher, | |
|
21 | }; | |
|
19 | 22 | use hg::{ |
|
20 | 23 | matchers::{AlwaysMatcher, FileMatcher, IncludeMatcher}, |
|
21 | 24 | parse_pattern_syntax, |
@@ -233,6 +236,12 b' fn extract_matcher(' | |||
|
233 | 236 | |
|
234 | 237 | Ok(Box::new(IntersectionMatcher::new(m1, m2))) |
|
235 | 238 | } |
|
239 | "differencematcher" => { | |
|
240 | let m1 = extract_matcher(py, matcher.getattr(py, "_m1")?)?; | |
|
241 | let m2 = extract_matcher(py, matcher.getattr(py, "_m2")?)?; | |
|
242 | ||
|
243 | Ok(Box::new(DifferenceMatcher::new(m1, m2))) | |
|
244 | } | |
|
236 | 245 | e => Err(PyErr::new::<FallbackError, _>( |
|
237 | 246 | py, |
|
238 | 247 | format!("Unsupported matcher {}", e), |
General Comments 0
You need to be logged in to leave comments.
Login now