SVN

Introduction

Subversion (SVN) is the Version Control System used at LCAV. It allows several users to make concurrent access to multiple files. Typical examples where this situation may arise include the scenario where a lecturer and his teaching assistant are preparing lecture notes/homeworks for a course, a few PhD students are writing a paper together or several users need to access the source code of a software under development.

SVN Server

Every project (e.g. a course, a paper, a software) corresponds to a directory on a server of the I&C faculty accessible at “https://icsvn.epfl.ch/lcav/”. For example, if the project name is MYPROJECT, then its address is given by “https://icsvn.epfl.ch/lcav/MYPROJECT”. All the files related to this project can be found in this directory. In order to modify the content of this directory, a local copy must first be obtained using one of the SVN clients listed below. This operation is referred to as a “checkout”. The content can then be modified locally. Finally, the changes are propagated back to the server. This operation is referred to as a “commit”.

SVN Clients

A SVN client is a program running on your machine that allows to access and update the directories available on the SVN server. The SVN clients are either shell-based (i.e. SVN commands are directly typed on the command line) or with a graphical user interface (GUI). The use of shell-based clients is encouraged since it allows to get acquainted with the basic SVN commands. Your favorite client can be downloaded from the following links:

If you have any problem with the installation of the SVN client, please contact the SVN administrator.

 

Case Study

We list here the main steps to follow in order to create and modify the files of a generic project named MYPROJECT. We provide the basic SVN commands to be used with a shell-based client. For GUI environments, please refer to the documentation below.

  1. Download and install your favorite SVN client.
  2. Ask the SVN administrator to create a new SVN directory called MYPROJECT. He will:
    • Register you as a new user of the SVN system and provide you with a username and password to access it.
    • Create a new directory MYPROJECT and grant you the appropriate access rights to it.
    • Provide you with the URL to access the content of your directory, typically “https://icsvn.epfl.ch/lcav/MYPROJECT/trunk”.
  3. Checkout MYPROJECT by running the command

    “svn co https://icsvn.epfl.ch/lcav/MYPROJECT/trunk MYPROJECT –username=your_user_name”.

    Enter your password and a local copy of the project will be stored on your machine in a directory called MYPROJECT created in the current directory. The checkout operation only needs to be performed once.
     

  4. Create a file “test.txt” inside your directory MYPROJECT and add it to the SVN structure using the command

    “svn add test.txt”

    You can perform similarly with other files and directories.
     

  5. To view the operations pending (i.e. the operations that will be performed by the SVN client in the next commit), run the command

    “svn status”

    in the directory MYPROJECT. An operation can be removed from the list by simply invoking

    “svn revert your_filename”

    For example, the previous add operation can be undone by running the command “svn revert text.txt”.
     

  6. To propagate your changes to the SVN server, run the command

    “svn commit”

    in the directory MYPROJECT and provide with detailed comments regarding your commit.
     

  7. To obtain the latest available version of the directory MYPROJECT, simply run the command

    “svn update”

    in the directory MYPROJECT.
     

 

Remarks:

  • The content of the directory MYPROJECT on the SVN server can be browsed at the address “https://icsvn.epfl.ch/lcav/MYPROJECT/trunk” using a standard web browser.
  • An email is sent to you every time someone commits changes to a directory for which you have been granted access rights.

 

To Practice a Little Bit…

In order to get used with the SVN commands, a TEST directory has been set up on the SVN server. Once access rights have been granted to you (check with the SVN administrator), you can freely add, remove and modify files within this directory without worrying about its content. The URL of the TEST directory is https://icsvn.epfl.ch/lcav/TEST/trunk.

Documentation

To obtain more detailed information about the SVN system please checkout the following links:

For further information

For further information, please contact the SVN administrator.