Setting up svn repository

SVN stores all project files in a repository. Every user checks out files from this repository and uploads their modification to this repositories. This way every user has the most recent version of the project files.

Step 1: Create repository
The repository holds all files in a project.

cd ~
svnadmin create svnrespos
svn mkdir file:///home/me/svnrepos/trunk \
file:///home/me/svnrepos/branches \
file:///home/me/svnrepos/tags \
-m "creating repository layout"

To see what you created

svn list file:///home/me/svnrepos

Step 2: Import project into the repository
Here we import project files into the SVN repository. Assuming that the project files are in ~/myproject and it contains files a.xml and a.dtd

cd ~
svn import myproject file:///home/me/svnrepos/trunk -m "importing project"

To see what was imported

svn list file:///home/me/svnrepos/trunk

Step 3: Check out a working copy
Every collaborator works on his working copy rather than the repository itself.

cd ~
svn checkout file:///home/me/svnrepos/trunk xml-project

This would create a directory called xml-project and copy all project files from the repository to this directory. User can edit these files.