CommitMergeAnalyzer¶
- class dsviper.CommitMergeAnalyzer¶
Bases:
objectAdditive, post-merge 3-way reconciliation over a CommitDatabase. Static methods only; the Commit Engine itself is not modified.
Note: Not directly instantiable.
- static analyze_merge(db: CommitDatabase, merge_commit: ValueCommitId) CommitMergeAnalysis¶
Read the state of merge_commit and return a CommitMergeAnalysis: the loci where one branch’s intent did not survive the merge. 3-way when a unique structural base exists, base-free 2-way fallback otherwise. Raises when merge_commit is not a merge commit.
- static merge_base(db: CommitDatabase, a: ValueCommitId, b: ValueCommitId) ValueCommitId | None¶
Return the structural merge base of two commits, or None when there is no common ancestor or several maximal common ancestors (criss-cross).
- static reconcile(db: CommitDatabase, merge_commit: ValueCommitId, resolutions: list[CommitMergeResolution], label: str) ValueCommitId¶
Author the survival commit for a merge: per document, copy the merge state, place each decree at its path, then diff against the merge state. Returns a Mutations commit child of merge_commit, or merge_commit itself when every decree accepts the merge (no surviving opcode).