Skip to content

feature: Stage 3 merge tools use /tmp views of ancestor and marker (issue #65) - #67

Merged
rich0 merged 3 commits into
developfrom
feature/stage3-merge-view-temps
Jul 18, 2026
Merged

feature: Stage 3 merge tools use /tmp views of ancestor and marker (issue #65)#67
rich0 merged 3 commits into
developfrom
feature/stage3-merge-view-temps

Conversation

@rich0

@rich0 rich0 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Before launching Stage 3 interactive 3-way tools, copy the ancestor ($path_backup_new) and Portage marker ($path_new) to disposable files under $TMPDIR//tmp.
  • Pass those views to the tool; keep the live file and *.merge output paths real so the merge workflow is unchanged.
  • Always restore real paths and clean up temps after the tool exits (success, cancel, or retry).
  • Update tool_intro for meld/kdiff3/xxdiff/tkdiff/imediff to note that non-live panes are temporary.
  • Brief ARCHITECTURE note for Stage 3.

This closes the mid-merge usability footgun where saving Meld’s middle/right panes could corrupt future Stage 2 ancestors or the ._cfg* marker.

Tests

  • Tier D: mock kdiff3/imediff argv points at cfg-update-$$-* temps, not real backup/marker paths.
  • Hostile mock overwrites tool input files; real ancestor + marker stay intact on cancel; complete still applies golden merge.
  • Temp cleanup asserted under sandbox TMPDIR.
  • Full suite: perl -c cfg-update + ./test/run-tests.sh --full215 passed.

Related

…ssue #65)

Pass disposable copies of the 3-way ancestor and Portage ._cfg* marker to
interactive merge tools so accidental saves on non-live panes cannot corrupt
permanent backups or markers. Live file and *.merge output paths stay real.

Also extends Tier D mocks/tests (hostile input overwrite, temp path checks)
and clarifies tool_intro for 3-way tools.
Comment thread cfg-update Outdated
Comment thread cfg-update Outdated
Comment thread cfg-update Outdated
Drop file-scope $path_view_* globals. make_merge_view_temps takes basename
and real paths and returns the two view paths; cleanup takes those paths;
launch_tool_with_merge_view_temps keeps them as my locals and only rebinds
existing $path_backup_new/$path_new around launch_tool.
Replace the Stage-3-only pair API with make_merge_view_temp /
cleanup_merge_view_temp operating on one path. Stage 3 calls each twice.
Keeps a thin cleanup_merge_view_temps(@paths) convenience for 0-N temps.

Prepares for Stage 4 marker-only views (issue #68).
@rich0
rich0 merged commit ce14dec into develop Jul 18, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Refactor/cleanup cfg-update Jul 18, 2026
@rich0
rich0 deleted the feature/stage3-merge-view-temps branch August 1, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant