Distinction Between Status and Update

Subversion attempts to erase a lot of the confusion between the cvs status and cvs update commands.

The cvs status command has two purposes: first, to show the user any local modifications in the working copy, and second, to show the user which files are out of date. Unfortunately, because of CVS’s hard-to-read status output, many CVS users don’t take advantage of this command at all. Instead, they’ve developed a habit of running cvs update or cvs -n update to quickly see their changes. If users forget to use the -n option, this has the side effect of merging repository changes they may not be ready to deal with.

Subversion removes this muddle by making the output of svn status easy to read for both humans and parsers. Also, svn update prints only information about files that are updated, not local modifications.

Status

svn status prints all files that have local modifications. By default, the repository is not contacted. While this subcommand accepts a fair number of options, the following are the most commonly used ones:

-u

Contact the repository to determine, and then display, out-of-dateness information.

-v

Show all entries under version control.

-N

Run nonrecursively (do not descend into subdirectories).

The svn status command has two output formats. In the default short format, local modifications look like this:

$ svn status
M      foo.c
M      bar/baz.c

If you specify the --show-updates (-u) option, a longer output format is used:

$ svn status -u M ...

Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.