Adopt WorkspaceRoot
convention for root dirs, fix root ambiguity issues
#470
+899
−507
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
Motivation
vcspull import --scan
treated~/study/c
,~/study/c/
, and/home/user/study/c
as three unrelated sections, so existing repositories were re-offered during
scans.
duplication to persist after a format pass.
the newer workspace-root language.
What changed
pathlib.Path
, collapse to a single label, and memoize the mapping for reuseacross importer and formatter flows.
vcspull import
to normalize both config files and newly discovereddirectories before merging, ensuring repeated scans do not present the same
repositories twice.
vcspull fmt
to call the same normalization routine prior tosorting/writing, so the formatter also removes duplicate sections and writes
consistent labels.
--base-dir-key
/--dir
CLI options and internal parameters with--workspace-root
, and refreshed CLI help, README, and docs to match.covering all combinations of tilde, absolute, trailing-slash, and relative
workspace-root inputs.
Testing
uv run ruff check . --fix --show-fixes
uv run ruff format .
uv run mypy
uv run py.test
uv run vcspull import --scan ~/study/c
uv run vcspull fmt --write --all