feat(faseD): divergent pull -> merge + conflict surfacing + pull --abort - #18
Merged
Conversation
… --abort
Completes git-like pull. When local and server diverge, deltix pull now merges
instead of refusing.
- VersioningLocalService.mergeFromRemote: checkout <branch>, 'dolt merge
origin/<branch>'; exit 0 -> merged, exit 1 -> read 'dolt_conflicts' and
return per-table conflict counts (leaves repo mid-merge).
- mergeAbort: 'dolt merge --abort' (restores clean tree).
- CLI runPull: divergent path materializes server commits onto origin/<branch>
(fetch), then merges into local branch; on conflicts prints a git-like report
and instructs 'deltix pull --abort'. Adds '--abort' flag.
- Fix checkoutBranch substring bug: 'origin/main'.includes('main') was true, so
it failed to switch to the working branch. Now compares active_branch() exactly.
Verified against real Dolt: conflicting pull -> {conflicts:[{t,1}]}, abort ->
clean tree; non-conflicting pull -> merged with both sides' rows (1,2,3).
113 unit tests pass, build + lint clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the git-like pull: when local and server diverge,
deltix pullmerges instead of refusing, surfaces conflicts, and supports--abort.Changes
dolt merge origin/<branch>; exit 0 → merged, exit 1 → readsdolt_conflictsand returns per-table conflict counts (repo left mid-merge).dolt merge --abort.origin/<branch>then merges into the local branch; on conflicts prints a git-like report +deltix pull --aborthint. Adds--abort.checkoutBranchusedstdout.includes(branch)—'origin/main'.includes('main')was true, so it never switched back to the working branch. Now comparesactive_branch()exactly.Verification
Real Dolt: conflicting pull →
{conflicts:[{t,1}]}, abort → clean tree; non-conflicting pull → merged with both sides' rows (1,2,3). 113 unit tests pass, build + lint clean.