pub struct ReconciliationPlan {
pub left_id: StateId,
pub right_id: StateId,
pub base_id: StateId,
pub parent_choice: bool,
pub path_overrides: BTreeMap<Vec<PathComponent>, Value>,
}Expand description
Reconciliation plan specifying how to merge two branches
Fields§
§left_id: StateIdLeft (first) branch revision
right_id: StateIdRight (second) branch revision
base_id: StateIdCommon ancestor revision
parent_choice: boolWhich branch to use as primary: true for left, false for right
path_overrides: BTreeMap<Vec<PathComponent>, Value>Override values for specific paths (caller-supplied)
Implementations§
Source§impl ReconciliationPlan
impl ReconciliationPlan
Source§impl ReconciliationPlan
impl ReconciliationPlan
Sourcepub fn selected_parent<'a>(
&self,
left: &'a StateRevision,
right: &'a StateRevision,
) -> &'a StateRevision
pub fn selected_parent<'a>( &self, left: &'a StateRevision, right: &'a StateRevision, ) -> &'a StateRevision
The branch this plan selects as the state to start from.
parent_choice is a bool and so has exactly two values: true is the
left branch, false the right. The ancestor is not a choice, and there
is no third value for this to reject.
Sourcepub fn unresolved_conflicts(
&self,
classification: &ConflictClassification,
) -> Vec<Vec<PathComponent>>
pub fn unresolved_conflicts( &self, classification: &ConflictClassification, ) -> Vec<Vec<PathComponent>>
The conflicting paths this plan supplies no override for.
Descriptive, not enforced. Application does not require an override for every conflict: leaving one unaddressed resolves it to whatever the selected parent holds, and selecting that parent is itself an explicit caller decision. A caller that wants every conflict addressed individually can require this to be empty before applying.