[][src]Struct hg::MissingAncestors

pub struct MissingAncestors<G: Graph> { /* fields omitted */ }

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]

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]

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

impl<G> Sync for MissingAncestors<G> where
    G: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.