Page kind: Reference
swarmops merge-base#
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.
- 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#
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).
| Field | Type | Required | Description |
|---|---|---|---|
base | string | yes | The newest changeset on the first-parent chains of both rev and onto. |
diff | Diff | yes | The first page of the diff from base to rev. |
onto | string | yes | The changeset onto named. |
rev | string | yes | The 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).