[Lintula home] -> [Software] -> [Subversion]
Lintula
Subversion on Lintula and TST computers
This page contains some information on using a revision control system
called Subversion on Lintula and
TST computers. This is just brief instructions about where to put the
Subversion repository, how to create and access the repository and how to use
Subversion with a course account. General instructions about Subversion can
be found for example at http://svnbook.red-bean.com/. There
are also Finnish instructions on how to use Subversion on TUT Software
systems courses at http://www.cs.tut.fi/~ohjtuki/svn/.
Repository location
The repository should always be located on redundant disk space that is
automatically backed up in a regular fashion.
For non-personal projects, the best place for a repository is a course or
project directory. This can either be under the course accounts home
directory (if the size of the repository is a few hundred megabytes) or under
/share/XXXprojects/ or /share/XXXcourses/ -directories. The repository should
NOT be located under the personal home directory or under the home directory
of the webhotel virtual machine.
More information about disk space on
Lintula computers.
Repository location for personal projects
For personal projects, the best place for the repository is probably the
users home directory (if the size of the repository is small) or department
personnel directory /share/XXXusers/<username>.
Subversion on Lintula computers
Creating a repository for a project
The repository for a non-personal project should be accessible by all
project members, i.e. all users in the course accounts group. The repository
should be located in project directory, the repository directory and all
files and directories under that should have the course account as a group
owner and should be group writable.
Example on how to create a repository in a directory called
/share/XXXprojects/tproject/repository/ that will be owned by a course
account called tproject:
hopeatilhi:~$ mkdir /share/XXXprojects/tproject/repository
|
This command creates the directory called repository for the
repository.
hopeatilhi:~$ chgrp tproject /share/XXXprojects/tproject/repository
|
This command changes the group owner of the directory to the course account
called tproject.
hopeatilhi:~$ chmod u=rwx,g=rwx,g+s,o= /share/XXXprojects/tproject/repository
|
This command adds read-write permissions to the owner and to the group owner
of the directory and setgid-bit and removes all permissions from others.
This command sets the default file permissions for owner and group owner to
read-write and none for others so that the repository created with next
command will have correct permissions.
hopeatilhi:~$ svnadmin create --fs-type fsfs /share/XXXprojects/tproject/repository
|
This command creates the repository.
hopeatilhi:~$ chmod g+w /share/XXXprojects/tproject/repository/db/rep-cache.db
|
This command fixes the permission error caused by svnadmin create command.
Checking out and accessing the repository with a Lintula workstation or
ssh-server
The repository located in a shared directory (for example directories
under /share/ or /home/ directories) can be accessed through the filesystem
(ie. with file:// prefix) on Lintula workstations and ssh servers. For
example:
hopeatilhi:~$ svn ls file:///share/XXXprojects/tproject/repository
|
This command lists the files and directories in the repository (if you
haven't checked out the working copy of the repository).
hopeatilhi:~$ svn checkout file:///share/XXXprojects/tproject/repository
|
This command checks out a working copy of the repository.
Checking out and accessing the repository from some other computer (and
for example Lintula Linux Laptop or Lintula Webhotel virtual machines)
The repository located on shared directory Lintula can be accessed with
the svn+ssh protocol through Lintula ssh-servers, for example
kaarne.cs.tut.fi. For example :
linuxlaptop:~$ svn ls svn+ssh://tuser@kaarne.cs.tut.fi/share/XXXprojects/tproject/repository
tuser@kaarne.cs.tut.fi's password: Lintula password
|
This command lists the files and directories in the repository (if you
haven't checked out the working copy of the repository). Username of the user
is tuser.
linuxlaptop:~$ svn checkout svn+ssh://tuser@kaarne.cs.tut.fi/share/XXXprojects/tproject/repository
tuser@kaarne.cs.tut.fi's password: Lintula password
|
This command checks out a working copy of the repository. Username of the
user is tuser
Subversion (TortoiseSVN) on TST windows workstation
Creating a repository for a project
A repository can be created on Lintula network disk with TortoiseSVN
client on TST windows workstation, if network disk is available (the
workstation is connected to TST network or VPN connection is active).
| 1. |
Open file manager window in the folder
you want to create the repository. This can be done for example by
selecting Start -> Run and typing the name of the
folder to the Open: textbox. In this example we use a project
directory called tstadmin in the Department of Signal Processing
project disk. |
|
| 2. |
Create a folder for the repository.
Click right mouse button in the file manager and select New
-> Folder. The name of the created folder will be the name
of the repository. |
 |
| 3. |
Create a repository in the folder
created. Click the created folder with right mouse button and select
TortoiseSVN -> Create repository here. |
 |
|
The repository is created. |
 |
Checking out and accessing the repository with a TST windows
workstation
A repository located on Lintula network disk can be accessed with
TortoiseSVN client on TST windows workstation. If network disk is available
(the workstation is connected to TST network or VPN connection is active),
the repository can be accessed with file: URL and without network disk
access, the repository can be accessed with svn+ssh URL via Lintula ssh
servers. Using file: URL is easier, because you do not need to enter your
Lintula password when updating the working copy or commiting to the
repository.
| 1. |
Create a folder for the working copy
of the repository. You should use local disk, for example
D:\user\username folder, for this, because no backups are needed.
Open file manager for this folder and select New ->
Folder. |
|
| 2. |
Select the folder created with right
mouse button in the file manager and select SVN
Checkout.... |
 |
| 3. |
In the Checkout window type the URL
of the repository: If you use TST windows workstation, you can
use file: URL, for example
file:\\sgnsamba.cs.tut.fi\projects\tstadmin\svnrepo and if you
are using some other computer (which can't use Lintula network disk),
you have to use svn+ssh: URL, for example
svn+ssh://tuser@kaarne.cs.tut.fi/share/sgnprojects/tstadmin/svnrepo
where tuser is Lintula username. |
 |
02.12.2011