Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #516 +/- ##
==========================================
+ Coverage 84.38% 84.51% +0.13%
==========================================
Files 37 38 +1
Lines 5969 6142 +173
Branches 1184 1235 +51
==========================================
+ Hits 5037 5191 +154
- Misses 634 646 +12
- Partials 298 305 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
db913f7 to
0967b56
Compare
|
Re-authored on current Landed: the flagship Deferred: styling newly-added entries in |
|
Automated review finding. Recorded here so it is not lost. Nothing has been pushed to this branch and no fix is applied — this is a note, not a change request.
|
why: Document vcspull fmt --style behavior in the CLI reference and record the v1.70.x What's new changelog entry. what: - Add an Output styles section with examples to docs/cli/fmt.md - Add a What's new entry for vcspull fmt --style (#516) in CHANGES
why: Document vcspull fmt --style behavior in the CLI reference and record the v1.70.x What's new changelog entry. what: - Add an Output styles section with examples to docs/cli/fmt.md - Add a What's new entry for vcspull fmt --style (#516) in CHANGES
why: Centralize the three repository entry output styles (concise, standard, verbose) in a shared enum and type alias for formatting APIs. what: - Add ConfigStyle enum with CONCISE, STANDARD, and VERBOSE members - Add RawRepoEntry type alias for serialized string or mapping entries
why: Provide bidirectional conversion across concise, standard, and verbose repository entry formats without discarding extra blocks or emitting invalid backend keys. what: - Add format_repo_entry, restyle_repo_entry, and apply_config_style - Strip redundant vcs and single-origin remotes when restyling back to standard or concise while keeping load-bearing vcs, custom remotes, and extra blocks intact - Omit remotes on Subversion entries so libvcs SvnSync construction succeeds - Require a direct .git entry in _read_git_remotes so uncloned paths inside an enclosing checkout do not inherit parent remotes - Add unit, round-trip, and snapshot tests for config_style
why: Let vcspull fmt convert repository entries between concise,
standard, and verbose styles on demand while keeping plain vcspull fmt
and pinned entries unchanged.
what:
- Add --style {concise,standard,verbose} to create_fmt_subparser and
thread ConfigStyle through cli, format_config_file,
format_single_config, and format_config
- Pass resolved workspace base_dirs into format_config and
apply_config_style so --style verbose reads remotes from local Git
checkouts on disk
- Cover CLI round-tripping, Subversion sync backend construction, local
Git remote discovery, and pinned/lossy entry preservation
why: Document vcspull fmt --style behavior in the CLI reference and record the v1.70.x What's new changelog entry. what: - Add an Output styles section with examples to docs/cli/fmt.md - Add a What's new entry for vcspull fmt --style (#516) in CHANGES
why: Document the new --style option on vcspull fmt and ConfigStyle forms for users upgrading workspaces. what: - Describe concise, standard, and verbose entry formatting under What's new
… TypeVars why: _is_redundant_remotes returned an unsound Unknown | Literal[False] union under ty when comparing unnarrowed Mapping values, and RawRepoEntry, config_style, and fmt style tests used Any or object where YamlValue, RepoEntryDict, and Mapping TypeVars express the contracts. what: - Add YamlScalar and YamlValue in vcspull.types and narrow RawRepoEntry to str | dict[str, YamlValue] - Parameterize config_style helpers over Mapping value TypeVars and narrow origin fetch_url/push_url to str before comparing - Narrow unpinned workspace entries in cli/fmt.py and style fixtures in tests/_internal/test_config_style.py and tests/cli/test_fmt.py
Summary
flask: git+url), standard (flask: {repo: git+url}), and verbose (flask: {remotes: {...}, repo: git+url, vcs: git})--style {concise,standard,verbose}tovcspull fmtfor bidirectional restyling across styles, reading local Git remotes on disk when expanding toverboseConfigStyle,format_repo_entry(),restyle_repo_entry(), andapply_config_style()invcspull._internal.config_style, omittingremoteson Subversion entries and preserving custom configuration blocks across round-tripsRefs #592
Three config styles
conciseflask: git+https://...strstandardflask: {repo: git+https://...}dict(repokey, plus any custom blocks)verboseflask: {remotes: {origin: ...}, repo: git+url, vcs: git}dict(repo+vcs, plusremoteson Git/Hg)Default behavior when
--styleis omitted matchesstandardnormalization with no breaking changes.Before and after
Before (
standard):After
vcspull fmt --style concise --write:After
vcspull fmt --style verbose --write:Key design decisions
extract_repos()andvalidator.pyalready accept all three input forms.vcskeys and single-originremotesmatching the primary URL when restyling tostandardorconcise, while warning inconciseand preserving entries that carry custom blocks, split push/fetch URLs, extra remotes, or an explicitvcson an unprefixed URL.--styleis passed so plainvcspull fmtand pinned entries keep their existing behavior.base_dirswhen expanding toverbose, and omitremoteson Subversion entries.Changes
ConfigStyle(concise,standard,verbose) andRawRepoEntryinsrc/vcspull/types.pyformat_repo_entry(),restyle_repo_entry(), andapply_config_style()insrc/vcspull/_internal/config_style.py--style {concise,standard,verbose}tovcspull fmtinsrc/vcspull/cli/fmt.pyandsrc/vcspull/cli/__init__.py, threading resolved workspacebase_dirsfor local Git remote discoveryvcspull fmt --styleindocs/cli/fmt.mdandCHANGEStests/_internal/test_config_style.pyandtests/cli/test_fmt.pyTest plan
uv run py.testcovers bidirectionalconcise/standard/verboseround-trips, custom-block preservation, local Git remote discovery, and Subversionremotesomissionuv run ruff check .,uv run ruff format --check ., anduv run mypy .pass on the style types and CLI plumbinguv run python scripts/generate_schema.py --checkconfirms configuration schema agreementjust build-docsbuildsdocs/cli/fmt.mdandCHANGESwith zero cross-reference warningsvcspull fmt --style concise --write,vcspull fmt --style verbose --write, andvcspull fmt --style standard --writeagainst a sample config to confirm clean round-tripping