Subversion 101

Registration

If you don't have an account to our SVN system, open this page and register yourself. An administrator will manually activate the account and send you an email that account is ready.

If you already have an account and require access to an additional repository, contact a staff member of the University of Applied Sciences Osnabrück. An administrator will grant you access and notify you via email. There is no need to register an additional account to get access to multiple repository.

If you forgot your password write an email to an administrator. You will get a personalised link to set a new password.

Using SVN

The following sections are meant to give a short introduction in using the basic functions needed most often. For a deeper insight be refered to the book Version Control with Subversion.

Read-access

You can download every file with any ordinary web browser. Simply navigate to https://mobcom.ecs.hs-osnabrueck.de/svn/PROJECTNAME/.

Enter your username and password you used for registration. If the browser tells you, you don't have permission to access the repository, ask an administrator to grant you access (see chapter registration).

Read/Write access

To be able to upload or modify files in a SVN repository a proper SVN client is needed. SVN clients for all major operating systems exists. You can find a list of clients here. The reminder on this page assumes you are using TortoiseSVN, one of the most popular and easiest clients for Windows (free).

To start using SVN you must check out the repository. Basically that means to download all files and folders including some meta information. Checking out a repository is done in the following steps:

  1. Download and install TortoiseSVN (for windows) from http://tortoisesvn.tigris.org/. For other operating systems find a SVN client that you find suitable.
  2. Create a folder (e.g. PROJECTNAME) somewhere in your file system. The exact name does not matter.
  3. Link folder to SVN: on folder press right-mouse->TortoiseSVN->Checkout
  4. Fill in URL
  5. Enter your username and password you used for registration

All files should now be available in the selected folder and you can start modifing them as explained in the following section.

Updating your local copy

Every time files have been modified by someone you need to resynchronize your files and folders with the SVN: on folder or file press: right-mouse->SVNUpdate

You should do an update and lock (see section Locking) everytime before starting to work on a file. Modifing an old version of a file will lead to a so-called conflict and you will not be able to upload your changes until the confict has been resolved. For text-based documents your client will try to merge your modifications into the latest version coming from the server. If the changes are at the same place, both versions will be put into the file with markings around them. For binary files (that includes Word documents) a copy for each version will be created and you must do the merging manually. In either case, after you are finished you must mark the conflict as resolved by right-mouse-click -> TortoiseSVN -> Resolve.

Adding new files/folder

New files or folders created within the repository folder are not automatically uploaded/synchronised with the SVN server. Before that, they have to be added to the repository. To add a file to a repository call the 'Add' function from the context menu. When adding a folder, all files within are added recursively. After adding a file you need to commit this change as explained in the following chapter.

Commiting Changes

When you have modified a file you need to commit these changes to the SVN. Call the commit function in the context menu. In the following dialog enter a comment (required) and click "OK".

Please avoid making copies of a file for newer versions. The SVN server keeps track of older version (see: right-mouse->TortoiseSVN->showlog) that can be retrieved at any time.

Locking

Modifing a file in a SVN repository means modifing a local copy and afterwards commiting the changes. If in the meantime someone else has commited changes, you are not able to commit your changes and you get a conflict. To avoid that you should always lock the file you are currently working on. For as long as you have the lock, this ensures that only you can commit a new version. To get the lock for a file call the 'Get lock...' function from the context menu. When commiting changes on a locked file, this file automatically gets unlocked, unless you explicity say to keep the lock. To unlock an unmodified file an unlock function can be found in the files context menu.