Subversion

Page 46

Basic Usage

D item The file, directory, or symbolic link item has been scheduled for deletion from the repository. M item The contents of the file item have been modified. If you pass a specific path to svn status, you get information about that item alone: $ svn status stuff/fish.c D stuff/fish.c svn status also has a --verbose (-v) switch, which will show you the status of every item in your working copy, even if it has not been changed: $ svn status -v M 44 44 M 44 44 44 D 44 44 A 0 44

23 30 20 18 35 19 21 ? 36

sally sally harry ira harry ira sally ? harry

README INSTALL bar.c stuff stuff/trout.c stuff/fish.c stuff/things stuff/things/bloo.h stuff/things/gloo.c

This is the “long form” output of svn status. The first column remains the same, but the second column shows the working-revision of the item. The third and fourth columns show the revision in which the item last changed, and who changed it (these columns are not to be confused with the columns of characters that we just discussed). None of the above invocations to svn status contact the repository, they work only locally by comparing the metadata in the .svn directory with the working copy. Finally, there is the -show-updates (-u) option, which contacts the repository and adds information about things that are out-of-date: $ svn status -u -v M * 44 M 44 * 44 D 44 A 0 Status against revision:

23 20 35 19 ? 46

sally harry harry ira ?

README bar.c stuff/trout.c stuff/fish.c stuff/things/bloo.h

Notice the two asterisks: if you were to run svn update at this point, you would receive changes to README and trout.c. This tells you some very useful information—you'll need to update and get the server changes on README before you commit, or the repository will reject your commit for being out-of-date. (More on this subject later.) svn status displays much more information about the files and directories in your working copy than we've shown here—for an exhaustive description of svn status and its output, see svn status.

24


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.