Skip to content

import-ldif and import-project keep the tree's Library folders - #148

Merged
jcombs-pointblue merged 1 commit into
masterfrom
import-keeps-aliases
Nov 30, 2026
Merged

jcombs-pointblue merged 1 commit into
masterfrom
import-keeps-aliases

Conversation

@jcombs-pointblue

Copy link
Copy Markdown
Contributor

Follow-up to the Open item in library-containers.md (#147).

Since 0.79.0, import-live, capture and Update this branch keep the tree's folder for each Library it already has. import-ldif and import-project still worked the aliases out again from the source. So when an LDIF or Designer project gained a second container named Library, the existing libraries/Library/ folder was renamed to libraries/Library@services/, and the tree's history showed its files moving.

  • Cli.keepTreeAliases: a new helper. When <outDir> already holds a tree, it calls Libraries.adoptAliases with that tree, so only a container new to the tree gets a fresh alias. import-ldif, import-project and import-live now all use it.
  • Unreadable tree: if the existing tree can't be read, the command prints a note: and uses the source's own aliases. import-live used to stop with an error in that case.
  • Docs: commands.md, tree-layout.md and library-containers.md are updated, the note's Open section is removed, and the CHANGELOG has an Unreleased entry.

Tests

  • New ImportKeepsLibraryFoldersTest: runs two import-ldif passes into one tree, where the second LDIF adds cn=Library,o=other. libraries/Library/ stays, and the new container gets its own folder. It also checks that a fresh tree still gets the source's own aliases (Library@services, Library@other).
  • Without the change: the first test fails, because the folder becomes Library@services.
  • Full build: 1083 tests, 0 failures, 11 skipped.

🤖 Generated with Claude Code

Over an existing tree, both now give each other Library the tree already
has its existing alias (Libraries.adoptAliases), as import-live and
capture do since 0.79.0. A source with a second container of the same
name no longer renames the first one's folder. The three commands share
one helper, Cli.keepTreeAliases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jcombs-pointblue
jcombs-pointblue merged commit 42d5597 into master Nov 30, 2026
4 checks passed
@jcombs-pointblue
jcombs-pointblue deleted the import-keeps-aliases branch November 30, 2026 15:07
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