Page kind: Reference
swarmops ws snapshot#
Record a workspace's edits as a changeset on its head, which moves no ref.
The workspace keeps its head, its files and its edits. The same edits on the same head again write nothing and answer the same id; ws info names the latest.
- Group
workspaces- Since
0.11.0- Mutates
- yes
- Identity required
- no
- MCP tool
ws_snapshot- Envelope op
ws_snapshot- Exit codes
- 0
- Errors
- none
Syntax#
swarmops ws snapshot [OPTIONS]Required arguments#
None.
Optional arguments#
The command also takes the global options.
Syntax: --ws <NAME>.
The workspace, by its name in the store's registry (default: the one around the working directory).
Syntax: --ws-path <DIR>.
The workspace's directory.
Syntax: --status-after <STATUS_AFTER>.
Default: page.
page: the first page of the status follows the result; none: it is left out. Values: page: The first page of the status; none: No status.
Examples#
No recorded example yet.
No recorded example yet.
Return information#
result is a WsSnapshotResp (swarmops schema WsSnapshotResp prints its JSON Schema).
| Field | Type | Required | Description |
|---|---|---|---|
snapshot | string or null | no | The snapshot, readable by id from any process; omitted when there were no edits. |
status_after | WsStatus or null | no | The status after the mutation; omitted when the request said none. |
written | SnapshotWrite | yes | Whether this call wrote it. |
Envelope op: ws_snapshot.
Exit codes:
0: Success.
Errors#
No golden step shows this command failing yet.
Any command that opens a store may also fail with a store error, such as E_NOT_A_REPO, E_IO or E_STORE_CORRUPT; a command line the grammar refuses is E_INVALID_ARG (exit 2).