diff rust/hg-core/src/ancestors.rs @ 42327:e8f3740cc067

rust-filepatterns: add a Rust implementation of pattern-related utils This change introduces Rust implementations of two functions related to pattern handling, all located in `match.py`: - `_regex` - `readpatternfile` These utils are useful in the long-term effort to improve `hg status`'s performance using Rust. Experimental work done by Valentin Gatien-Baron shows very promising improvements, but is too different from the current Mercurial core code structure to be used "as-is". This is the first - albeit very small - step towards the code revamp needed down the line. Two dependencies were added: `regex` and `lazy_static`. Both of them will be useful for a majority of the Rust code that will be written, are well known and maintained either by the Rust core team, or by very frequent contributors. Differential Revision: https://phab.mercurial-scm.org/D6271
author Rapha?l Gom?s <rgomes@octobus.net>
date Wed, 24 Apr 2019 11:34:09 +0200
parents 9060af281be7
children ce6797ef6eab
line wrap: on
line diff
--- a/rust/hg-core/src/ancestors.rs	Wed May 15 22:11:41 2019 -0700
+++ b/rust/hg-core/src/ancestors.rs	Wed Apr 24 11:34:09 2019 +0200
@@ -8,9 +8,9 @@
 //! Rust versions of generic DAG ancestors algorithms for Mercurial
 
 use super::{Graph, GraphError, Revision, NULL_REVISION};
+use crate::dagops;
 use std::cmp::max;
 use std::collections::{BinaryHeap, HashSet};
-use crate::dagops;
 
 /// Iterator over the ancestors of a given list of revisions
 /// This is a generic type, defined and implemented for any Graph, so that