Subversion use

create a repository

I have an area for repositories on in /home/repositories. Create a new repository by running the following.
Note that you will likely need to run this as root.

svnadmin create /home/repository/myname
chown -R daemon.daemon /home/repository/myname
chmod -R g+w /home/repository/myname

Here myname is the new repository name. A new repository is needed for each independent thing you work on.

configure apache

cd /usr/local/apache2/conf/extra
vi httpd-repos.conf

Add an alias similar to the ones at the top:

Alias /myname/       "/home/repository/myname" 

Copy one of the existing svn configuration blocks and change it for your repository.
Here is an example for the myname repository.

<Location /myname>
    DAV svn 
    SVNPath /home/repository/myname

    AuthType Basic
    AuthName "subversion repository" 
    AuthBasicProvider file
    AuthUserFile "/usr/local/apache2/passwd/access.svn" 

       Require user redmine a_user_here another_user_here


After changing the apache configuration files, you must restart the Apache server. The chant to do that is:
/usr/local/apache2/bin/apachectl -k restart

put initial stuff into the repository

After you create the repository, check it out and run the following commands,

svn checkout
cd myname
svn mkdir trunk 
svn mkdir tags 
svn mkdir branches
svn commit -m "some comment" 
cd ..
rm -rf myname
svn checkout myname

Instead of the checkout/mkdir sequence, you can populate the repository using "svn import". Make sure the directory you import has subdirectories named trunk, tags, and branches. Run the following command from the directory to import, being sure to include a project name:

cd ~jbk/myproject # assume new code is in here
svn import . -m "a comment here" 
cd ~jbk
svn checkout myname
# look to see if everything is where it should be in ~jbk/myname
# if it is, then
rm -rf ~jbk/myproject

(note: I actually do not use import very often at all and I have not tested it in a long time - most of the time I am starting with a new repository)

Go somewhere else and attempt to check it back out.

The "svn checkout" lines above check out only the trunk of myproject from reposiory myname into a directory myproject (made by the svn command).

The first time you use the https oink link to checkout a repository, you will be prompted for certificate storage (maybe) and will be prompted for a user name and password. You will need to get this from Jim or Marc.

The subversion book is at