Skip to content

Commit ec77c71

Browse files
committed
docs(CHANGES): Note checkout targets, backend blocks, and JSON Schema
1 parent c21cfb9 commit ec77c71

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

‎CHANGES‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,90 @@ _Notes on upcoming releases will be added here_
4545
Python 3.10 reached end-of-life in October 2026. vcspull now requires Python
4646
3.11 or newer.
4747

48+
#### Configuration loading validates repository entries strictly (#589)
49+
50+
Configuration loading now rejects unknown repository, target, policy, or backend
51+
option keys, mismatched VCS option blocks, integers outside `-(2**53 - 1)` to
52+
`2**53 - 1`, non-JSON `metadata` values, raw `combine:` filter strings, and
53+
unprefixed SCP URLs whose path starts with a non-ASCII character without `vcs`.
54+
Run {ref}`cli-migrate` with `--write` to rewrite legacy `options` and
55+
`<vcs>_options` entries into `working_copy`, backend blocks, and entry-level
56+
`pin` fields.
57+
58+
```yaml
59+
# Before
60+
~/code/:
61+
libvcs:
62+
repo: git+https://github.com/vcs-python/libvcs.git
63+
options:
64+
rev: v0.46.0
65+
shallow: true
66+
pin:
67+
import: true
68+
69+
# After
70+
~/code/:
71+
libvcs:
72+
repo: git+https://github.com/vcs-python/libvcs.git
73+
working_copy:
74+
rev: v0.46.0
75+
git:
76+
depth: 1
77+
pin:
78+
import: true
79+
```
80+
81+
### What's new
82+
83+
#### Configure partial clones and typed backend options (#589)
84+
85+
`git`, `hg`, and `svn` blocks match their libvcs options classes. Loading
86+
rejects unknown fields, invalid values, and blocks for a different VCS before
87+
sync starts. Errors identify the file, workspace, repository, and field.
88+
Overridden legacy values are validated too. Integer fields accept integral
89+
numbers such as `2.0`; metadata accepts JSON-compatible values.
90+
91+
```yaml
92+
~/code/:
93+
git:
94+
repo: git+https://github.com/git/git.git
95+
git:
96+
filter: blob:none
97+
```
98+
99+
Partial clones retain commit history and fetch file contents on demand.
100+
Existing checkouts keep their depth and filter. Legacy option locations load
101+
with a migration warning. `pin`, `pin_reason`, and `allow_overwrite` also work
102+
at the repository entry level.
103+
104+
#### Complete and validate configuration in editors (#589)
105+
106+
The published JSON Schema describes backend options, partial-clone filter kinds
107+
and string completions, shared checkout targets, remote URLs, and entry policy,
108+
with hover descriptions on option and filter fields. Add the
109+
`yaml-language-server` schema directive shown in {ref}`configuration` for
110+
editor completion and validation. The CLI keeps its runtime validation
111+
independent of schema-generation dependencies. Numeric settings use exact JSON
112+
integers through `2**53 - 1`; native filter strings retain Git's full uint64
113+
range. URL inference is stable across Python versions. Unicode-leading SCP
114+
paths require an explicit VCS. See {ref}`migration`.
115+
116+
#### Migrate checkout targets and backend options (#589)
117+
118+
{ref}`cli-migrate` separates legacy settings into `working_copy`, the
119+
matching backend block, and entry-level pin policy in one pass. Unknown
120+
legacy options stop migration and {ref}`cli-fmt` with exit status `1` before
121+
writing the configuration file. `add` and `discover` write the same layout.
122+
`import` and `fmt` migrate entries they rewrite and preserve entries pinned for
123+
that command. See {ref}`migration` for an upgrade example.
124+
125+
#### Validate shared checkout targets (#589)
126+
127+
`working_copy` and `worktrees` accept the same `branch`, `tag`, `commit`, or
128+
`rev` selector, fetch remote, and `sync` policy. Loading rejects multiple
129+
selectors, unknown keys, and invalid drift or dirty policies, naming the
130+
configuration file, workspace root, repository entry, and field.
131+
48132
### Fixes
49133

50134
#### Separate workspace and repository names in legacy-key warnings (#588)

0 commit comments

Comments
 (0)