Using Subversion Repositories - Quick Start
Having used the web frontend to create a new repository, you need to use a subversion client. This quick start guide will give you examples of basic usage via the command line in Linux and with TortoiseSVN in Windows.
Please note that TortoiseSVN is implemented as a Windows shell extension and most of its functionality is accessed by right clicking when selecting a file or folder.
These examples assume that the repository is available at the following address. You will need to modify these instructions to reflect the actual address used for your repository.
https://codex.cs.bham.ac.uk/svn/YourUserName/YourRepositoryName/
IDE's
As subversion becomes more popular, more development environments have their own subversion tool built in to the IDE. Most come with built in 'help' functionality so the following instructions should be used as a basis for setting up subversion within your IDE.
Linux
Checking out your repository
In order to start using your repository you first need to check it out into your local working directory.
svn checkout https://codex.cs.bham.ac.uk/svn/YourUserName/YourRepositoryName/
Adding new files or directories
To add a new file or directory to a project that has been checked out use the following command to have subversion include it in its version control.
svn add your_filename_or_directory_name
nb. You will need to 'commit' the new file or directory before it is added to the repository
Delete files/directories
You can delete files/directories from the repository.
svn delete -m "Deleting file" your_filename
Commit changes
Commit records any changes made to file/directories in the repository.
svn commit -m "Recording changes made"
Updating local files
If you have a number of files checked out and would like to update them to the most recent version held in the repository use the update command.
svn update
If there are newer files in the repository on the server, they will overwrite the local versions.
Other commands
There are a numerous additional commands available with Subversion. For more information use the following:
svn --help
Windows - TortoiseSVN
You will need to select which repository you wish to use.
Right click on the 'working folder' that you will use to hold your local copy of the repository. Select TortoiseSVN from the drop-down list and then Repo-browser. Enter the address of the repository e.g.
https://codex.cs.bham.ac.uk/svn/YourUserName/YourRepositoryName/
Checking out your repository
Right click on the TortoiseSVN windows to get a drop down list to access the various subversion functions.
In order to start using your repository you first need to check it out into your local working directory. You will have to select a suitable folder to use as your local working directory
Adding new files or directories
To add a new file or directory to a project that has been checked out select "Add File..." or "Add Folder..." as appropriate.
nb. You will need to 'commit' the new file or directory before it is added to the repository
Delete files/directories
You can delete files/directories from the repository. This is accessed from the same drop down list as previously described.
Commit changes
Commit records any changes made to file/directories in the repository. The local working directory should display a green tick next to the folder bitmap image - if you right-click it you should see two additional options including "SVN Commit". Before commiting you will be given the opportunity to add a message - you could use this to provide brief information on what is being committed.
Updating local files
If you have a number of files checked out and would like to update them to the most recent version held in the repository use the "SVN Update" option. If there are newer files in the repository on the server, they will overwrite the local versions.
Further information
TortoiseSVN has an inbuilt help facility which provides information on the functions listed on this page and on other functionality that it provides. An online manual is also available.