comparison rust/hg-core/src/lib.rs @ 47093:787ff5d21bcd

dirstate-tree: Make Rust DirstateMap bindings go through a trait object This changeset starts a series that adds an experiment to make status faster by changing the dirstate (first only in memory and later also on disk) to be shaped as a tree matching the directory structure, instead of the current flat collection of entries. The status algorithm can then traverse this tree dirstate at the same time as it traverses the filesystem. We (Octobus) have made prototypes that show promising results but are prone to bitrot. We would like to start upstreaming some experimental Rust code that goes in this direction, but to avoid disrupting users it should only be enabled by some run-time opt-in while keeping the existing dirstate structure and status algorithm as-is. The `DirstateMap` type and `status` function look like the appropriate boundary. This adds a new trait that abstracts everything Python bindings need and makes those bindings go through a `dyn` trait object. Later we’ll have two implementations of this trait, and the same bindings can use either. Differential Revision: https://phab.mercurial-scm.org/D10362
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 30 Mar 2021 14:15:23 +0200
parents bcdcb4423ae3
children 5d62243c7732
comparison
equal deleted inserted replaced
47092:102a50746bc5 47093:787ff5d21bcd
7 mod ancestors; 7 mod ancestors;
8 pub mod dagops; 8 pub mod dagops;
9 pub mod errors; 9 pub mod errors;
10 pub use ancestors::{AncestorsIterator, LazyAncestors, MissingAncestors}; 10 pub use ancestors::{AncestorsIterator, LazyAncestors, MissingAncestors};
11 mod dirstate; 11 mod dirstate;
12 pub mod dirstate_tree;
12 pub mod discovery; 13 pub mod discovery;
13 pub mod requirements; 14 pub mod requirements;
14 pub mod testing; // unconditionally built, for use from integration tests 15 pub mod testing; // unconditionally built, for use from integration tests
15 pub use dirstate::{ 16 pub use dirstate::{
16 dirs_multiset::{DirsMultiset, DirsMultisetIter}, 17 dirs_multiset::{DirsMultiset, DirsMultisetIter},