equal
deleted
inserted
replaced
6 // GNU General Public License version 2 or any later version. |
6 // GNU General Public License version 2 or any later version. |
7 |
7 |
8 //! Miscellaneous DAG operations |
8 //! Miscellaneous DAG operations |
9 //! |
9 //! |
10 //! # Terminology |
10 //! # Terminology |
11 //! - By *relative heads* of a collection of revision numbers (`Revision`), |
11 //! - By *relative heads* of a collection of revision numbers (`Revision`), we |
12 //! we mean those revisions that have no children among the collection. |
12 //! mean those revisions that have no children among the collection. |
13 //! - Similarly *relative roots* of a collection of `Revision`, we mean |
13 //! - Similarly *relative roots* of a collection of `Revision`, we mean those |
14 //! those whose parents, if any, don't belong to the collection. |
14 //! whose parents, if any, don't belong to the collection. |
15 use super::{Graph, GraphError, Revision, NULL_REVISION}; |
15 use super::{Graph, GraphError, Revision, NULL_REVISION}; |
16 use crate::ancestors::AncestorsIterator; |
16 use crate::ancestors::AncestorsIterator; |
17 use std::collections::{BTreeSet, HashSet}; |
17 use std::collections::{BTreeSet, HashSet}; |
18 |
18 |
19 fn remove_parents( |
19 fn remove_parents( |
270 range_vec(SampleGraph, &[5, 6], &[10, 12])?, |
270 range_vec(SampleGraph, &[5, 6], &[10, 12])?, |
271 vec![5, 6, 9, 10, 12] |
271 vec![5, 6, 9, 10, 12] |
272 ); |
272 ); |
273 Ok(()) |
273 Ok(()) |
274 } |
274 } |
275 |
275 } |
276 } |
|