Page 155 -
P. 155

Examine all changes
                          When the programmer is ready to commit all of his changes to the repository, he should use
                          the svn status command to ensure that his working copy contains only the changes he
                          intends.

                            $ svn status hello-world/
                            M      hello-world/trunk/hello-world.c
                            A      hello-world/trunk/Makefile
                          The svn status command generates a list of all of the files in the working copy that have
                          changed since it was checked out. It does not connect to the repository to do this. Instead, it
                          uses the reference copy of the checked-out revision that was stored as part of the working
                          copy.

                          Each file listed by svn status has a one-letter code next to it. Table 7-7 contains a list of
                          codes that svn status will return. (If the programmer passes a specific path to svn status,it
                          only returns the status of that file.)

                          TABLE 7-7. Output codes for svn status command
                          (reprinted with permission from Version Control with Subversion)

                           A item
                             The file, directory, or symbolic link item has been scheduled for addition into the repository.
                           C item
                             The file item is in a state of conflict. That is, changes received from the server during an update overlap with local
                             changes that you have in your working copy. You must resolve this conflict before committing your changes to the
                             repository.
                           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.
                           X item
                             The directory item is unversioned, but is related to a Subversion externals definition.
                           ? item
                             The file, directory, or symbolic link item is not under version control. You can silence the question marks by either
                             passing the --quiet (-q) switch to svn status
                           ! item

                             The file, directory, or symbolic link item is under version control but is missing or somehow incomplete. The item
                             can be missing if it’s removed using a non-Subversion command. In the case of a directory, it can be incomplete if
                             you happened to interrupt a checkout or update. A quick svn update will refetch the file or directory from the
                             repository, or svn revert file will restore a missing file.
                           ~ item
                             The file, directory, or symbolic link item is in the repository as one kind of object, but what’s actually in your working
                             copy is some other kind. For example, Subversion might have a file in the repository, but you removed the file and
                             created a directory in its place, without using the svn delete or svn add command.
                           I item
                             The file, directory, or symbolic link item is not under version control, and Subversion is configured to ignore it dur-
                             ing svn add, svn import, and svn status operations. Note that this symbol only shows up if you pass the --no-
                             ignore option to svn status—otherwise the file would be ignored and not listed at all!






                                                                                  DESIGN AND PROGRAMMING  147
   150   151   152   153   154   155   156   157   158   159   160