This web is incomplete. We are working on it!!'''''

Politics and Quick Guide of use about svn

What is svn?

Cycle use of svn

We will explain, a typical cycle of use (download, edit and update) from svn, commenting on the major commands.

  1. Getting a working copy Use the checkout (or co) command, this transaction create a repository on our local file system. It contains the URL of where we are going to copy and the local folder.
    svn checkout solBCN-unstable
  2. Working We can modify the files with our editor, and also modify the structure of the directory tree (add/remove/copy/move file). This commands are:
    svn [add|rm|cp|mv] file
  3. Checking changes We check the changes of the directory tree:
    svn status
    We can also check the status of a single file, adding the file name (svn status file). This command will return a list of all modifications to the directory tree, with a letter indicating the type of change:
  • A Add file.
  • D Delete file.
  • M Modified file (respect to the original).
  • _M Modified file in its properties (respect to the original).
  • ? The file exists in the local copy, but not in the repository (why? may be a temporary file created by compilations, or we forgot to do 'svn add').
  • ! The file exists in the repository, but not in the local copy (why? may be we forgot to do 'svn remove').
  • ~ Something that is marked as a file and is a directory or the opposite.
  1. Updating the working copy It is important to update our local copy before sending our changes. We use the following command:
    svn up
    And it displays a list of files that have changed and a letter initial to know the kind change:
  • U The file (which was unchanged) was updated
  • G A file that had changed was updated, and Subversion has combined the two changes without any problems.
  • C A file that has changed has been updated and the change has created a conflict. If there is a conflict in some file, you must resolve it manually. Open the file, note the parts that Subversion indicate the local and the global repository changes, and resolve the conflict. Once we have done we have to run the command:
    svn resolve file
    To tell to Subversion that the conflict is resolved.
  1. Sending our changes We use the 'commit' command to which we will usually spend an informational message:
    svn commit -m "menssage"
    If the 'commit' fails, is because there are news changes in the global repository, in which case we will have to update and back to point 4.