Skip to content

feat(faseD): divergent pull -> merge + conflict surfacing + pull --abort - #18

Merged
SammyBytes merged 1 commit into
mainfrom
feat/faseD-merge
Aug 29, 2026
Merged

feat(faseD): divergent pull -> merge + conflict surfacing + pull --abort#18
SammyBytes merged 1 commit into
mainfrom
feat/faseD-merge

Conversation

@SammyBytes

Copy link
Copy Markdown
Owner

Summary

Completes the git-like pull: when local and server diverge, deltix pull merges instead of refusing, surfaces conflicts, and supports --abort.

Changes

  • VersioningLocalService.mergeFromRemote: dolt merge origin/<branch>; exit 0 → merged, exit 1 → reads dolt_conflicts and returns per-table conflict counts (repo left mid-merge).
  • mergeAbort: dolt merge --abort.
  • CLI runPull: divergent path materializes server commits onto origin/<branch> then merges into the local branch; on conflicts prints a git-like report + deltix pull --abort hint. Adds --abort.
  • Bug fix: checkoutBranch used stdout.includes(branch)'origin/main'.includes('main') was true, so it never switched back to the working branch. Now compares active_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.

… --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.
@SammyBytes
SammyBytes merged commit c81b33e into main Aug 29, 2026
2 checks passed
@SammyBytes
SammyBytes deleted the feat/faseD-merge branch August 29, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant