What is Subversion? This document explains.
What is svn (Subversion)
It is a tool to help you keep track of versions of your code or documents that you write. You can also collaborate with others on the same project by checking out versions and so on.
The basic idea is:
- IT provides a server that offers you some space to "import" versions of your project from your own computer.
- You download and install a free svn client (like Tortoise for windows) on your own computer. This lets you communicate to the server and update your project. Once the client is on your computer, you can for example right-click on a folder and choose to "import" this version of your folder into your repository on the server.
- You can configure your project to also be shared and updated by any collaborators that also have Rice NetIDs.
See also the complete svn reference documentation
What do you need to do to start using svn
STEP 1: Request for a place to be created where you will be keeping versions of your project. This is called a "repository".
- Go to http://old.apply.rice.edu, login with your NetID, then go to Account maintenance.
- Choose Repository Management from the left column. Choose a name for your "repository" and type it in. You can keep up to 3 repositories at a time.
- Wait for a while as directed by the apply.rice.edu site, for the automatic scripts to run and create your repository.
STEP 2: Use your browser to verify that your repository is there.
- Use a browser to go to https://svn.rice.edu/r/<name of your repository>
- Authenticate using your NetID and password (not adrice\netid, just NetID)
STEP 3: Get the software you need to start updating your project
- Look at the left side of the complete svn reference documentation for the links to download the client for your platform.
- Download and install the client for your operating system.
The suggested software in the complete svn reference documentation is
Tortoise.Once you download and install it, your windows explorer gives
you the ability to use its options. So, when you right-click on a folder
you get extra options of what you can do with this folder via Tortoise.
You can "import" the folder from your computer into your repository on the subversion server. You can "export" the latest version from your repository back to your computer and so on.
You will need to provide the path to your repository in all your communications with your svn server. The path will be like https://svn.rice.edu/r/<name of your repository>
MacOSX should have the svn library already available. Open a terminal window and run the command which svn" to make sure you have svn. Then *svn help will tell you what the options are. For example, to export your project from the svn server to your local machine you need to run:
You will need to download and install a subversion client package, if your machine does not already have one installed. The standard Rice iso for Redhat that you can download from http://linuxsupport.rice.edu contains the necessary package/libraries and so gives command-line svn options are immediately available to you.
following screenshot comes from a Ubuntu 8.04 machine using the "SVN
Workbench". This is a GUI that lets you use svn manipulations. Again the
idea is that you use the "Add" action to add a project to your workbench and then use the "Check-in" button to upload it to the server and the "Check-out" button to download it back to your own machine.
STEP 4: Configure your project to let others collaborate with you
When you request for your "repository" to be created, you will notice that a folder called "rice_config" is created within the repository. In it there is a file called "access_file", which is used to control access to your repository. There is also a file called "access_file.readme" that explains how to use the access_file to control access to your repository by other users.
How to edit the access_file
The idea is that you use a basic text editor (vi, wordpad etc) to edit the access_file. In there you declare groups of users using their netid. All users have to have a netid to collaborate with you. If they do not, you can ask for a guest account netid for them. Go tohttp://guest.rice.edu to do so, and become their sponsor.
The access_file is made up of blocks that create groups and then blocks that tell what groups have what access to which subfolder in the repository. The first line declares the block. Here is an excerpt form the access_file.readme:
Here is an example of an access_file.
Commit the changes and start using the access_file
After you edit the file you will need to commit the changes to the repository. Run
The process that reads the access_file after it has been commited runs every few minutes. Your changes will take effect in about 2 to 3 minutes after you have run the svn commit command.