
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
46
|
Chapter 3: Guided Tour
$ svn checkout --revision 1729 # Checks out a new working copy at r1729
...
$ svn update --revision 1729 # Updates an existing working copy to r1729
...
Other Useful Commands
While not as frequently used as the commands previously discussed in this chapter,
you occasionally need the following commands.
svn cleanup
When Subversion modifies your working copy (or any information within .svn), it
tries to do so as safely as possible. Before changing anything, it writes its intentions
to a log file, executes the commands in the log file, then removes the log file (this is
similar in design to a journaled filesystem). If a Subversion operation is interrupted
(if the process is killed, or if the machine crashes, for example), the log files remain
on disk. By re-executing the log files, Subversion can complete the previously started
operation, and your working copy can get itself back into a consistent state.
And this is exactly what
svn cleanup does: it searches your working copy and runs
any leftover logs, removing locks in the process. If Subversion ever tells you that
some part of your working copy is locked, then this is the command that you should
run. Also,
svn status will display an L next to locked items:
$ svn status
L somedir
M somedir/foo.c
$ svn cleanup
$ svn status ...