Archive‎ > ‎Fall 2009‎ > ‎Course Project‎ > ‎Buddy Suite‎ > ‎Tutorial #3‎ > ‎

Introduction to SVN

Quick overview of the most important svn commands:


svn checkout initialize a local copy of the repository and fetches the current version of the code


svn checkout


In case your teammate did modifications, and commited them: you can import them into your local copy


svn update [paths]


After modifying your local copy, you should export them to the server, this is done using commit.


svn commit -m "message" [paths]

If commit fails with a error looking like: "svn: The version resource does not correspond to the resource within the transaction.  Either the requested version resource is out of date (needs to be updated), or the requested version resource is newer than the transaction root (restart the commit)." or with an "out-of-date" error, it means that your local version is too old, and that you need to update it first.

Resolving conflicts

If more than one users edited the different sections of the same file, update will be able to merge them. If you edited the same section, svn won't be able to distinguish the correct version, and will ask you to resolve the conflict (on recent svn clients):

Conflict discovered in '...'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options:

If you use "e", or "edit", it will open the conflicting file with your favorite editor.
Conflicting sections will be displayed as follows:

<<<<<<< .mine
        return "plopas";
        return "plop";
>>>>>>> .r21

You can also use the option "mf" to specify that your version should be the one used, or "tf" to specify that the remote version should be used.