Repository navigation
Description
Summary
Upgrading from vcspull 1.68.0 to 1.70.0 on a multi-hundred-repository manifest with legacy options: {shallow: true} entries exposes three migration and diagnostic defects: load_configs() concatenates every affected 'workspace' -> 'repo' pair onto a single unbounded stderr warning line, validate_legacy_options() rejects legacy shallow: true on hg+ and svn+ entries (with a misleading .options.git error path) in both load_configs() and vcspull migrate, and match_vcs_url() returns () (VCS (unknown)) for unprefixed git:// and svn:// URLs. Together, a single legacy hg+, svn+, or git:// entry with options: {shallow: true} aborts unrelated vcspull sync <repo> commands and prevents vcspull migrate from rewriting the file.
Reproduction
-
Write a minimal legacy configuration file (
legacy.yaml) containing multipleoptions: {shallow: true}entries, a Mercurial repository withoptions: {shallow: true}(previously ignored as a no-op invcspull1.68.0), and an unprefixedgit://repository:./c/: bash: options: shallow: true repo: git://git.savannah.gnu.org/bash.git sdl: options: shallow: true repo: hg+https://hg.libsdl.org/SDL ./python/: click: options: shallow: true repo: git+https://github.com/pallets/click.git
-
Run
vcspull synctargeting onlyclick:$ vcspull -f legacy.yaml sync click -
Run
vcspull migrateon the file:$ vcspull migrate -f legacy.yaml
Expected
load_configs()caps theAffected:list in the legacy-options deprecation warning (for example, showing the first few entries plus(+N more)) instead of emitting thousands of repository names on one line, andvcspull migratebounds per-entry log lines on large manifests.match_vcs_url()andscripts/generate_schema.pyrecognize unprefixedgit://andsvn://URLs asgitandsvn, matching their explicit daemon protocol schemes.- Legacy
shallow: true/depthvalidation errors name the offending legacy key (options.shalloworoptions.depth, notoptions.git), andvcspull migratestrips no-op legacyshallow: truefromhgandsvnentries with a warning instead of aborting the migration of the entire file.
Actual
- On a large manifest,
load_configs()prints every legacy'workspace' -> 'repo'pair onto a single multi-kilobyte stderr line before validation runs. - Both
vcspull -f legacy.yaml sync clickandvcspull migrate -f legacy.yamlfail without migrating any entry:bash(git://git.savannah.gnu.org/bash.git) fails withoptions.git: options do not match the repository VCS (unknown).sdl(hg+https://hg.libsdl.org/SDL) fails withoptions.git: options do not match the repository VCS (hg).
Environment
Versions
vcspull:1.70.0(upgraded from1.68.0)libvcs:0.48.0- Python:
3.14 - OS: Linux
Proposal
- Cap
Affected:insrc/vcspull/config.pyat a small preview count (such as 5 entries followed by(+N more)) while preservingvcspull_legacy_counton the log record, and summarize remaining entries insrc/vcspull/cli/migrate.pywhen rewriting large files. - Recognize
git://andsvn://URLs inmatch_vcs_url()(src/vcspull/validator.py) andurl_predicates()(scripts/generate_schema.py), and regeneratedocs/_static/schemas/vcspull.schema.json. - Report the real legacy field path (
shallow/options.shallow/depth/options.depth) invalidate_legacy_options()instead of synthesizing.git, and teachvcspull migrateto drop unsupported legacyshallow: trueonhgandsvnentries with a warning so<=1.68.0manifests migrate cleanly in one pass.
References
- Unbounded legacy-options warning list in
src/vcspull/config.py(v1.70.0) and per-entry migration loop insrc/vcspull/cli/migrate.py(v1.70.0) match_vcs_url()andvalidate_legacy_options()insrc/vcspull/validator.py(v1.70.0) andsrc/vcspull/validator.py(v1.70.0, lines 213-222)- Schema URL predicates in
scripts/generate_schema.py(v1.70.0) - Related: config(feat): Add targets, VCS blocks, and schema #589,
1.68.xand beyond Roadmap #592, libvcs#546
Activity
migrate,config(fix): Handle hg/svn shallow, git:///svn:// URLs, and c…