svk revert — Undo all local edits.


svk revert PATH...


Reverts any local changes to a file or directory and resolves any conflicted states. svk revert will not only revert the contents of an item in your working copy, but also any property changes. Finally, you can use it to undo any scheduling operations that you may have done (e.g. files scheduled for addition or deletion can be “unscheduled”).

Alternate Names



Working copy

Accesses Depot


Accesses Mirrored Repository



--recursive (-R)
--quiet (-q)


Discard changes to a file:

$ svk revert integer.c
Reverted integer.c

If you want to revert a whole directory of files, use the --recursive flag:

$ svk revert --recursive .
Reverted newdir/afile
Reverted foo.c
Reverted bar.txt

Lastly, you can undo any scheduling operations:

$ svk add mistake.txt whoops
A   mistake.txt
A   whoops
A   whoops/oopsie.c
$ svk revert mistake.txt whoops
Reverted mistake.txt
Reverted whoops
$ svk status
?   mistake.txt
?   whoops


If you provide no targets to svk revert, it will do nothing—to protect you from accidentally losing changes in your working copy, svk revert requires you to provide at least one target. ##TODO Sadly currently this is not true and the svk revert actually defaults to . if no path is given.


You can use svk revert --recursive together with svk checkout --non-recursive to create a sparse working copy tree. Lets say you have a project called multi with 4 subdirectories and you only need the p1 and p2 subdirectories. To do so you could run:

$ svk checkout --non-recursive //multi
Syncing //multi(/multi) in /Users/sally/multi to 11.
 U  multi
$ cd multi
$ svk revert -R p1 p2
Reverted p1
Reverted p1/foo.c
Reverted p2
Reverted p2/bar.c