More Disconnected Operations

More Disconnected Operations

In recent years, disk space has become outrageously cheap and abundant, but network bandwidth has not. Therefore, the Subversion working copy has been optimized around the scarcer resource.

The .svn administrative directory serves the same purpose as the CVS directory, except that it also stores read-only, “pristine” copies of your files. This allows you to do many things off-line:

svn status

Shows you any local changes you've made (see the section called “See an overview of your changes”)

svn diff

Shows you the details of your changes (see the section called “Examine the details of your local modifications”)

svn revert

Removes your local changes (see the section called “Undoing Working Changes”)

Also, the cached pristine files allow the Subversion client to send differences when committing, which CVS cannot do.

The last subcommand in the list is new; it will not only remove local changes, but it will un-schedule operations such as adds and deletes. It's the preferred way to revert a file; running rm file; svn update will still work, but it blurs the purpose of updating. And, while we're on this subject…