SwarmOps
ReferenceCommandsswarmops merge-base

Page kind: Reference

swarmops merge-base#

Describes v0.11.0Last changed View as Markdown

Find where REV forks from ONTO along first parents, and list what REV changed since.

Prints the merge base, both revisions as full ids, and the first page of the unified diff from the base to REV, read in one snapshot. Read the next pages with diff BASE REV-ID --format unified --cursor C: the ids keep them on this base when a ref moves. Revisions that share no first-parent ancestor are E_INVALID_ARG.

Metadata
Group
read
Since
0.11.0
Mutates
no
Identity required
no
MCP tool
merge_base
Envelope op
merge_base
Exit codes
0
Errors
none

Syntax#

Syntax
swarmops merge-base [OPTIONS] <REV> <ONTO>

Required arguments#

Syntax: <REV>.

The change's side: the revision whose changes the diff lists.

Syntax: <ONTO>.

The side it would land on, such as main.

Optional arguments#

The command also takes the global options.

Syntax: --limit <N>. Default: 500.

The most files of the first page.

Syntax: --max-bytes <N>. Default: 32768.

The most bytes of the first page's files, as JSON (the first file comes all the same, its hunks cut to fit).

Examples#

No recorded example yet.

No recorded example yet.

Return information#

result is a MergeBaseResp (swarmops schema MergeBaseResp prints its JSON Schema).

FieldTypeRequiredDescription
basestringyesThe newest changeset on the first-parent chains of both rev and onto.
diffDiffyesThe first page of the diff from base to rev.
ontostringyesThe changeset onto named.
revstringyesThe changeset rev named.

Envelope op: merge_base.

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