Skip to main content

PlanMerge

Struct PlanMerge 

Source
pub struct PlanMerge<'vf> {
    pub a_rev: Vec<u8>,
    pub b_rev: Vec<u8>,
    pub key_prefix: Vec<Vec<u8>>,
    /* private fields */
}
Expand description

Annotate-based merge planner. Mirrors bzrformats.merge._PlanMerge.

Builds an in-memory weave from the per-file graph between the two tips (back to their recursive LCAs) and runs Weave.plan_merge over it. When one tip dominates the other in the per-file graph, short-circuits to tagging every line of the dominating text new-a/new-b.

Fields§

§a_rev: Vec<u8>§b_rev: Vec<u8>§key_prefix: Vec<Vec<u8>>

Implementations§

Source§

impl<'vf> PlanMerge<'vf>

Source

pub fn new( vf: &'vf dyn VersionedFiles, a_rev: Vec<u8>, b_rev: Vec<u8>, key_prefix: Vec<Vec<u8>>, ) -> Result<Self, KnitError>

Construct the planner, eagerly determining the dominating head (or building the in-memory weave). Mirrors _PlanMerge.__init__.

Source

pub fn plan_merge(&mut self) -> Result<Vec<(MergeTag, Vec<u8>)>, KnitError>

Generate the merge plan. Mirrors _PlanMerge.plan_merge.

Auto Trait Implementations§

§

impl<'vf> !RefUnwindSafe for PlanMerge<'vf>

§

impl<'vf> !UnwindSafe for PlanMerge<'vf>

§

impl<'vf> Freeze for PlanMerge<'vf>

§

impl<'vf> Send for PlanMerge<'vf>

§

impl<'vf> Sync for PlanMerge<'vf>

§

impl<'vf> Unpin for PlanMerge<'vf>

§

impl<'vf> UnsafeUnpin for PlanMerge<'vf>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Ungil for T
where T: Send,