Skip to content

Staging & commit

a puts the selection under version control — svn add, nothing more.

  • On a file row it adds that file.
  • On a directory row it adds everything untracked beneath it.
  • An untracked directory is added with its whole contents, which is how svn add reads one.

Only untracked paths can be added: a file SVN already tracks, one it ignores, or a directory with nothing untracked under it says so in a toast and nothing runs. However many files are involved, the add costs a single svn add invocation.

Adding is not destructive, so it neither confirms first nor marks the rows as in flight — they restyle to A on the keypress and come back if svn refuses them.

r undoes an add: reverting one un-schedules it and leaves the file on disk, untracked again.

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 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.

However many files a directory holds, staging it costs at most three svn invocations — one svn add, one svn changelist, one svn changelist --remove — rather than one per file. The command log shows them.

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          ││                                              │
│                              │╰──────────────────────────────────────────────╯
│                              │╭─ Command Log ────────────────────────────────╮
│                              ││No svn commands run yet.                      │
╰──────────────────────────────╯│                                              │
╭─ [4] Shelf ──────────────────╮│                                              │
│                              ││                                              │
╰──────────────────────────────╯╰──────────────────────────────────────────────╯
space stage · a add · v pick · n changelist · c commit · r revert · d delete · …

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          ││                                              │
│                              │╰──────────────────────────────────────────────╯
│                              │╭─ Command Log ────────────────────────────────╮
│                              ││No svn commands run yet.                      │
╰──────────────────────────────╯│                                              │
╭─ [4] Shelf ──────────────────╮│                                              │
│                              ││                                              │
╰──────────────────────────────╯╰──────────────────────────────────────────────╯
space stage · a add · v pick · n changelist · c commit · r revert · d delete · …

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 always recurses, which is what an added directory needs: svn refuses to un-schedule one without its children, so reverting the directory row takes the whole subtree back out of version control in one go rather than failing on the directory itself. The files stay on disk, untracked.

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 …            │││                                              │
╰────────────────── 1 of 3 ────╯│                                              │
╭─ [3] Log ────────────────────╮│                                              │
│  Rev Author Message          ││                                              │
│                              │╰──────────────────────────────────────────────╯
│                              │╭─ Command Log ────────────────────────────────╮
│                              ││No svn commands run yet.                      │
╰──────────────────────────────╯│                                              │
╭─ [4] Shelf ──────────────────╮│                                              │
│                              ││                                              │
╰──────────────────────────────╯╰──────────────────────────────────────────────╯
space stage · a add · v pick · n changelist · c commit · r revert · d delete · …

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.

An action over a set does not stop at the first file svn will not take. Every path is attempted, and the toast says what happened either way:

Outcome Toast
All of them landed reverted 4 files — or the file’s own name, when it was the only one
None of them did The failure, as svn reported it
Some did reverted 3 files, 1 file refused — …, as a warning

The third is the one to read. The working copy has moved for the files that landed and not for the rest, so the tree is left in a state neither the keypress nor a plain failure would describe. The refused path is named, with a count of any others behind it, and the Command Log holds the invocation.

The exception is a failure that is about the working copy rather than about a path — authentication, or a lock. Those stop the run where they are, since every remaining file would be refused for the same reason.

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