sow changes
sow changes lists the files that differ between two Generations, grouped by phase in the
order a safe update applies them: packages, then metadata, then entry points, then deletions. Use it
to review what a build changed before you publish, to drive your own sync script, or with base 0
to get a complete delivery manifest. It reads built state only, so run sow build first if pending
changes should be included. To deliver the result to a configured target, use
sow publish, which applies the same phases for you.
Synopsis
| Flag | Meaning | Default |
|---|---|---|
-C, --workdir DIR |
Workspace discovery start directory | current directory |
-r, --repo NAME |
Select a repository | selection rules |
--json |
Output JSON | false |
BASE_GENERATION defaults to the predecessor of the current Generation; see
Base Generation. The plan always covers the whole repository, so -d/--dist is
rejected.
Before it lists anything, changes runs the full sow check verification
on every Dist of the repository, using all CPUs (there is no -j). It costs as much as a check,
since it hashes every package file again, and it exits 5 instead of printing a plan when any
verification layer fails. Unbuilt desired changes do not count as a failure; see
Dirty and recovery states.
Output
The header names both Generations. Each following line has five tab-separated columns: operation, phase, path relative to the repository root, size, and SHA-256.
| Field | Values |
|---|---|
| operation | add, update, delete |
| phase | payload, metadata, pointer, delete |
To deliver a plan without SOW’s publisher, copy the files phase by phase in that order, or stage a complete copy and switch it into service.
Base Generation
BASE_GENERATION is a decimal integer in 0..current, where current is the number of the
current Generation.
- Base
0lists every file of the current Generation as an addition: the complete delivery manifest, excluding privatesow.ymland.sow/. - Base equal to the current Generation gives an empty plan. A repository that was never built gives
an empty
0 -> 0plan. - A base outside the range is rejected:
Examples
Save a complete manifest of the current Generation:
Show only the changes under one Dist:
Details
Dirty and recovery states
When desired state has unbuilt changes, the header shows dirty=true, but the plan still ends at
the current Generation. Pending payloads are private until a build moves them into the pool,
so they never appear in the plan.
changes exits 5 when the repository is recovering or error, when an operation or workspace
operation is unfinished, during a layout migration, or when the files on disk differ from the
current Generation’s manifest. Recover or repair the repository as the diagnostic says, then rerun.
A damaged public file, for example, stops it with the same error check reports:
A base inside the valid range whose manifest is no longer stored is rejected with exit 6.
Exit codes
| Code | Trigger |
|---|---|
0 |
Plan printed, including an empty plan |
1 |
Runtime I/O failure |
2 |
Usage error, -d supplied, workspace not found, or implicit repository selection is ambiguous |
5 |
A verification layer failed, the repository is recovering or error or has an unfinished operation, or state evidence is inconsistent |
6 |
Explicit repository is not configured, or Base Generation is outside the valid range or no longer stored |
See also
sow build— create the next Generationsow publish— deliver Generations to a configured targetsow log— operation records and their file changes- Repository Layout — public and private path boundaries