Skip to content

Staging & commit

SVN has no local staging index. revision emulates one with an SVN changelist named revision:staged:

  • space on a file adds it to that changelist — it is now staged.
  • space again removes it — unstaged.
  • c commits the staged set as a unit.

That maps a git-like stage-then-commit flow onto native SVN without inventing any state of its own. Nothing is hidden: run svn changelist --list in the same working copy and you will see exactly what revision sees.

An untracked (unversioned) file is svn added first, then staged, so a new file takes the same single keystroke as a modified one.

space on a directory row acts on everything beneath it, and it toggles:

  1. If anything under the directory can still be staged, stage all of it.
  2. Otherwise, if anything under it is in a changelist, remove all of it.
  3. Otherwise, a toast says there is nothing to stage or unstage there.

Files that are ignored or clean are skipped. The root / row covers the whole tree, so space there stages every pending change in one keystroke.

Step 2 removes files from any changelist, not just the staged bucket — the same as pressing space on a single file.

Staging, unstaging and changelist assignment restyle the row on the keypress. The svn changelist call runs behind it and reconciles when it answers, so holding space down a long list never waits on the working copy.

If svn refuses, the previous state comes back and an error toast says why — nothing is left claiming to be staged when it is not. The reconciling status read is authoritative: when it disagrees with what is on screen, the working copy wins, silently.

Setting optimisticUpdates to false makes every action wait for svn before anything moves.

Staged files carry a green in the Changes tree. Switch to the Changelists view with ] to see the staged set on its own, and select the (staged) row for the combined diff of everything in it.

╭─ [1] Status ─────────────────╮╭─ [0] Diff ───────────────────────────────────╮
│Root      /home/alice/work/wc ││changelist: (staged)                          │
│Source    /home/alice/work/wc ││                                              │
│CWD       /home/alice/work/wc ││Loading diff…                                 │
│Branch    trunk               ││                                              │
│Revision  r42                 ││                                              │
│                              ││                                              │
╰──────────────────────────────╯│                                              │
╭─ [2] ─ Changes ─── Changelist╮│                                              │
│> ◆ feature-x (1)             ││                                              │
│  ◆ (staged) (1)              ││                                              │
│  ◆ (unstaged) (1)            ││                                              │
│                              ││                                              │
│                              ││                                              │
╰────────────────── 1 of 3 ────╯│                                              │
╭─ [3] Log ────────────────────╮│                                              │
│  Rev Author Message          │╰──────────────────────────────────────────────╯
│                              │╭─ [4] Command Log ────────────────────────────╮
│                              ││No svn commands run yet.                      │
│                              ││                                              │
│                              ││                                              │
│                              ││                                              │
╰──────────────────────────────╯╰──────────────────────────────────────────────╯
space stage · n changelist · c commit · r revert · d delete · [ ] view · ? help 

Other ways to check your work before committing:

Press c. An inline message editor opens. ctrl+s submits, esc cancels. What gets committed depends on where you are:

Where What is committed
Changes view The staged set.
Changelists view, on a list That changelist.
Drilled into a changelist That changelist.

An empty message is rejected — SVN requires one. The result appears as a toast, and the svn commit invocation is recorded in the Command Log. Status and history reload automatically, so the committed files leave the tree and the new revision appears at the top of the Log panel.

The files going in are marked as in flight while svn works, and c is held until it answers, so a commit cannot be sent twice.

Key Action
r Revert the selected file, or every change under the selected directory.
d Delete the selected file, or every file under the selected directory.

Both are destructive, so both confirm first:

╭─ [1] Status ─────────────────╮╭─ [0] Diff ───────────────────────────────────╮
│Root      /home/alice/work/wc ││Loading diff…                                 │
│Source    /home/alice/work/wc ││                                              │
│CWD       /home/alice/work/wc ││                                              │
│Branch    trunk               ││                                              │
│Revision  r42                 ││                                              │
│                              ││                                              │
╰──────────────────────────────╯│                                              │
╭─ [2] ─ Changes ───╭─ Delete file? ───────────────────────╮                   │
│  ▾ /              │internal/app/app.go will be scheduled │                   │
│    ▾ internal/    │for deletion (removed on the next     │                   │
│      ▾ app/       │commit).                              │                   │
│>         M app.go │                                      │                   │
│                   │enter confirm · esc cancel            │                   │
╰────────────────── ╰──────────────────────────────────────╯                   │
╭─ [3] Log ────────────────────╮│                                              │
│  Rev Author Message          │╰──────────────────────────────────────────────╯
│                              │╭─ [4] Command Log ────────────────────────────╮
│                              ││No svn commands run yet.                      │
│                              ││                                              │
│                              ││                                              │
│                              ││                                              │
╰──────────────────────────────╯╰──────────────────────────────────────────────╯
space stage · n changelist · c commit · r revert · d delete · [ ] view · ? help 

enter or y confirms; esc or n cancels. Reverting discards uncommitted work and cannot be undone — save the diff with w first if you might want it back.

A revert, a delete or a commit is destructive, so — unlike staging — it is never shown as having succeeded before it has. The rows it touches are dimmed and tailed with the moment the prompt is confirmed, and the directories above them carry the count:

╭─ [1] Status ─────────────────╮╭─ [0] Diff ───────────────────────────────────╮
│Root      /home/alice/work/wc ││Loading diff…                                 │
│Source    /home/alice/work/wc ││                                              │
│CWD       /home/alice/work/wc ││                                              │
│Branch    trunk               ││                                              │
│Revision  r42                 ││                                              │
│                              ││                                              │
╰──────────────────────────────╯│                                              │
╭─ [2] ─ Changes ─── Changelist╮│                                              │
│  ▾ / 2…                      ││                                              │
│    ▾ src/ 2…                 ││                                              │
│>       M a.go …              ││                                              │
│        M b.go …              ││                                              │
│    ● M readme.md             ││                                              │
╰────────────────── 1 of 3 ────╯│                                              │
╭─ [3] Log ────────────────────╮│                                              │
│  Rev Author Message          │╰──────────────────────────────────────────────╯
│                              │╭─ [4] Command Log ────────────────────────────╮
│                              ││No svn commands run yet.                      │
│                              ││                                              │
│                              ││                                              │
│                              ││                                              │
╰──────────────────────────────╯╰──────────────────────────────────────────────╯
space stage · n changelist · c commit · r revert · d delete · [ ] view · ? help 

A row in flight is inert: staging, reverting or deleting it again does nothing, and a directory action skips over it rather than acting on it twice. The marks clear when svn answers — on success and on failure alike, with a toast either way.

Cancelling the confirmation prompt marks nothing.

Every key on this page is in the Changes section of the keybindings reference.