Page kind: Reference
swarmops sync#
Fetch the remote, land main's unpublished changes onto its head, move main there, and push it.
Changes the remote holds already (a SwarmOps-Changeset, SwarmOps-Squashed-From or SwarmOps-Land-Key line in one of its commits, or a change that merges as none) are dropped; the rest land onto the remote's head one by one, as land merges them. A remote that moved meanwhile makes it fetch and land again, up to --max-attempts. With --no-push it stops before the push, for a branch that takes pull requests only. It needs an identity: it moves main. sync status shows where main and the remote stand, offline.
- Group
remotes- Since
0.2.0- Mutates
- yes
- Identity required
- yes
- MCP tool
sync- Envelope op
sync- Exit codes
- 0
- Errors
- none
Syntax#
swarmops sync [OPTIONS] <REMOTE>
swarmops sync <COMMAND>Required arguments#
Syntax: <REMOTE>.
The remote, by its name.
Optional arguments#
The command also takes the global options.
Syntax: --no-push.
Land onto the remote's head and move main, but push nothing.
Syntax: --max-attempts <N>.
Default: 8.
How many times to fetch and land again when the remote or main moved meanwhile: 1 to 32.
Examples#
No recorded example yet.
No recorded example yet.
Return information#
result is a SyncResp (swarmops schema SyncResp prints its JSON Schema).
| Field | Type | Required | Description |
|---|---|---|---|
attempts | integer | yes | How many attempts it took. |
branch | string | yes | The followed branch. |
dropped | array of DroppedChange | yes | The changes the remote held already. |
main | HeadMove | yes | main's changeset before and after. |
published | array of PublishedChange | yes | The changes landed onto the remote's head, oldest first. |
remote | string | yes | The remote, by its name. |
remote_head | HeadMove | yes | The remote branch's commit before and after. |
status | SyncStatusKind | yes | What the sync did. |
warnings | array of string or null | no | What the sync has to say that did not stop it. Omitted when there is nothing. |
Envelope op: sync.
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).