Port a change to another lane

tovio cherry-pick, and why keeping the change id makes a backport resolve once.

Written By Dustin

Last updated About 3 hours ago

tovio cherry-pick chg:a3f7b2
tovio cherry-pick chg:a3f7b2 --onto release/1.2
tovio cherry-pick chg:start..chg:tip --onto release/1.2

Re-applies one or more changes onto another lane. Each argument is a chg: id or a commit address, and they are applied in the order given; a single <start>..<tip> argument ports that inclusive first-parent range instead. --onto defaults to the current lane.

How it differs from rebase

rebase moves a stack: the source lane advances and its descendants are re-derived with it. cherry-pick is additive — it advances the target lane, leaves the source untouched, and never cascades to descendants. That is what makes it the backport tool.

Keep the id, or fork it

tovio cherry-pick chg:a3f7b2 --onto release/1.2 --keep-id   # the default
tovio cherry-pick chg:a3f7b2 --onto release/1.2 --fork

--keep-id names the default: the ported change keeps its chg: id. That is what makes "resolve a backport conflict once and it re-applies" hold — the saved resolution is keyed to the change, so the next port of the same change replays it.

--fork mints a fresh change id per ported change and records cherry_picked_from provenance back to the source. Use it when the backport will deliberately diverge from its origin. The two flags are mutually exclusive, and the --json result maps each new id to its source.

Lane-scoped ids

tovio cherry-pick chg:a3f7b2@feature-x --onto main

When one change id is reachable from more than one lane, chg:<id>@<lane> says which lane's copy you mean.

Conflicts and refusals

A conflict materializes on the new tip as a conflict object: resolve it, then land. A source already present on the target is a no-op at exit 0, not an error.

  • TVO-OP-021 — the named change is a merge commit, or the range crosses one. A merge has no single delta to replay.
  • TVO-OP-022 — nothing was named, the range was empty, or a range was mixed with other revisions in one invocation.

Undo

tovio undo