[−][src]Struct hg::MissingAncestors
Methods
impl<G: Graph> MissingAncestors<G>
[src]
pub fn new(graph: G, bases: impl IntoIterator<Item = Revision>) -> Self
[src]
pub fn has_bases(&self) -> bool
[src]
pub fn get_bases<'a>(&'a self) -> &'a HashSet<Revision>
[src]
Return a reference to current bases.
This is useful in unit tests, but also setdiscovery.py does read the bases attribute of a ancestor.missingancestors instance.
pub fn bases_heads(&self) -> Result<HashSet<Revision>, GraphError>
[src]
Computes the relative heads of current bases.
The object is still usable after this.
pub fn into_bases_heads(self) -> Result<HashSet<Revision>, GraphError>
[src]
Consumes the object and returns the relative heads of its bases.
pub fn add_bases(&mut self, new_bases: impl IntoIterator<Item = Revision>)
[src]
Add some revisions to self.bases
Takes care of keeping self.max_base
up to date.
pub fn remove_ancestors_from(
&mut self,
revs: &mut HashSet<Revision>
) -> Result<(), GraphError>
[src]
&mut self,
revs: &mut HashSet<Revision>
) -> Result<(), GraphError>
Remove all ancestors of self.bases from the revs set (in place)
pub fn missing_ancestors(
&mut self,
revs: impl IntoIterator<Item = Revision>
) -> Result<Vec<Revision>, GraphError>
[src]
&mut self,
revs: impl IntoIterator<Item = Revision>
) -> Result<Vec<Revision>, GraphError>
Return all the ancestors of revs that are not ancestors of self.bases
This may include elements from revs.
Equivalent to the revset (::revs - ::self.bases). Revs are returned in revision number order, which is a topological order.
Auto Trait Implementations
impl<G> Send for MissingAncestors<G> where
G: Send,
G: Send,
impl<G> Sync for MissingAncestors<G> where
G: Sync,
G: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,