cub draft land
cub draft land
Land a draft's changes in the space it drafts
Synopsis
Land a draft: merge the changes made in it into the original units, in the draft's change set, and close the change set.
Landing opens the draft's change set (created now, as draft-
A draft lands only when it is in sync with the original and has no conflicts outstanding, in the units landing would change: each has to have taken everything its original has changed, so that syncing it would change nothing, and every conflict a sync recorded has to have been applied or dismissed. Otherwise landing is refused, naming the units, and nothing is locked: run "cub draft sync", resolve the conflicts with "cub unit conflicts" in the draft space, and land again. What lands is then what is in the draft. The check is made again once the change set holds the original units, which nothing else can change from then on; if the original changed in between, landing is refused and the change set keeps holding them until the draft is synced and landed.
Where the draft and the original both changed a path, a sync replaces the draft's value with the original's, unless the draft guards it: make the draft's changes with --guard Override=Upstream, so that the sync withholds the original's change and records it as a conflict on the draft unit for you to decide. The original's own guards also hold against landing: the draft's change to a path guarded in the original is withheld, and recorded as a conflict on the original unit, where "cub unit conflicts" shows it.
The change set is closed once the triggers and link resolves that follow the landing have finished, which the server waits for, so that what they write is part of the change. Closing ends the change and makes it ready to release or promote. A change set its ChangeWorkflow governs closes only when the workflow's Final prerequisites hold, and the gates are printed either way. If they do not hold, the change stays in the open change set on the original units, the draft is kept, and the command fails; land again once they hold, which also brings over anything changed in the draft since. An approval of the draft's units ("cub variant approve") counts on each original unit whose content landed as it was approved, if whoever gave it was permitted to approve in the original space; only units that landed with other content need approving there. The authors, whose own approvals do not count, are those who changed the draft, not whoever lands it. --force-reason closes it although they do not hold, as "cub variant changeset close --force-reason" does.
Once the change set has closed, the draft space is archived with everything in it, its syncback links included, as the record of the change. List archived drafts with "cub draft list --include-hidden=Archived".
Examples:
cub draft land acme-base/raise-web-memory --dry-run
cub draft land acme-base/raise-web-memory
cub draft land <draft> [flags]
Options
--change-workflow string ChangeWorkflow to govern the change set, when the draft was not proposed and landing creates it
--description string description of the change set, when the draft was not proposed and landing creates it
--dry-run report what the command would write, and write nothing
--force-reason string close the change set although its ChangeWorkflow's gates do not hold, or before the triggers and link resolves that follow the landing have finished, recording this reason on it
-h, --help help for land
-o, --output string Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
--quiet No default output.
--verbose Detailed output, additive with default output
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
SEE ALSO
- cub draft - Draft a change to a space in a space of its own, then land it