How it works
From your push
to main.
Push a branch as you do today, or a stack of small commits. Either way, this is what happens to it: six stops, each one a working model.
01 / A change
A change
keeps its name.
Whatever you push becomes a change: the unit that is reviewed and landed. It outlives every commit that carries it.
A branch is a change
So is a single commit
Change-Id, or use jj, and it is a change of its own. A chain of them is a stack.It keeps its name
A rebase, or an edit
rebase: nothing approved has changed. Anything else is an edit.#142Parse OWNERS filesIn review
- change id
I8f3a2c1d- stays
- commit
a41c9e2- new with every push
- 1initial
old revision, on the new parent9d41f0a=9d41f0athe new revision
A branch of three commits came in as change #142. Push to it again and see what Berrit makes of it.
02 / A stack
A stack is read,
not kept.
Send several commits and they are a stack of changes. One commit, or one branch, is simply a stack of one.
Read from the commits
Reviewed one at a time
Landed alone, or as one
Order across repositories
Depends-On: api#17 in a commit message makes a change wait until that one has landed. It orders; it tests nothing together.3f9c2a1maina41c9e2#142Parse OWNERS filesApproved7be0d15#143Compile OWNERS to rulesApproved needs api#17 Lease API In reviewc93f6a8#144Suggest reviewers from rulesIn review
A unit of two, #142 and #143. Both are approved, so it enters the train, is tested as one and lands by one fast-forward. If it fails, it leaves whole.
03 / Review and attention
Always
someone’s turn.
A change is never merely open. Each thing that happens to it moves the turn, so nobody has to remember whose it is.
Drafts, then one review
Then it is someone’s turn
Bad news goes to the author
An edit asks again
Mayaauthor
Theoreviewer
- draft
- draft
- draft
- Maya sent revision 1
Maya sent revision 1, so the turn is Theo’s. His three comments are drafts: nobody has seen them.
04 / The candidate
Rebuilt on
a moving tip.
While a change waits for review, main moves and other changes queue up. Berrit keeps working out what yours would land as.
Built for you, kept fresh
Conflicts, days early
Never a revision
Already on main?
3f9c2a1e07b44dClean- Revisions Maya sent
- 1
- Candidates Berrit built
- 1
Nothing is queued, so the candidate is #142 rebased onto the tip of main. It applies cleanly.
05 / The train
The last candidate
carries the rest.
Approved changes that asked to land queue up in order. The train tests one commit and lands many, always by fast-forward.
A chain of candidates
Test the last one
Find the one that fails
What a batch proves
Each line is a candidate: it holds every change it runs under.
- Runs
- 0
- Landed
- 0
- Ejected
- 0
Five candidates, each built on the one ahead. The longest holds all five changes.
06 / Landed
Then it is
on main.
Fast-forward only. The tip of main is the very commit a run passed on, and it still carries the change id it was reviewed under.
The turn is cleared, and berrit sync drops what landed from your local stack and rebases the rest. On a branch, pull main as you always have.
$ berrit sync #142 landed Parse OWNERS files #143 rebased Compile OWNERS to rules #144 rebased Suggest reviewers from rules