SwarmOps
ReferenceCommandsswarmops sync

Page kind: Reference

swarmops sync#

Describes v0.11.0Last changed View as Markdown

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.

Metadata
Group
remotes
Since
0.2.0
Mutates
yes
Identity required
yes
MCP tool
sync
Envelope op
sync
Exit codes
0
Errors
none

Syntax#

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).

FieldTypeRequiredDescription
attemptsintegeryesHow many attempts it took.
branchstringyesThe followed branch.
droppedarray of DroppedChangeyesThe changes the remote held already.
mainHeadMoveyesmain's changeset before and after.
publishedarray of PublishedChangeyesThe changes landed onto the remote's head, oldest first.
remotestringyesThe remote, by its name.
remote_headHeadMoveyesThe remote branch's commit before and after.
statusSyncStatusKindyesWhat the sync did.
warningsarray of string or nullnoWhat 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).

See also#

On this page