Skip to content

Replace existing destinations when merging symbolic links - #282

Open
Aschenbath wants to merge 1 commit into
jaraco:mainfrom
Aschenbath:fix/merge-tree-symlink-263
Open

Aschenbath wants to merge 1 commit into
jaraco:mainfrom
Aschenbath:fix/merge-tree-symlink-263

Conversation

@Aschenbath

Copy link
Copy Markdown

merge_tree(symlinks=True) now replaces an existing destination before copying a symbolic link. Repeated merges work when the old destination is a link (including a dangling link), a file, or a directory. Replacing a destination link leaves its target untouched, and relative link targets remain relative.

Fixes #263.

Validation: all five new regression cases fail on the original code; the merge-tree tests pass after the fix. The repository's tox environment on Windows / Python 3.12 passes all checks: 163 passed, 7 platform skips, including Ruff, mypy, package metadata, and coverage (98%).

Developed with Codex assistance.

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.

merge_tree(symlinks=True) cannot overwrite an existing destination symlink

1 participant