How To CSDMS Subversion

From CSDMS

Create a CSDMS subversion repository

First of all, our subversion repository is located on river at: /data/svn. To add a new user:

> /usr/bin/htdigest /data/svn/conf/svn-auth-file Subversion <username>

This of course must be done as root. The username needn't be a mysticplum username (although it can be).

Create the new repository (again as root):

> svnadmin create /data/svn/newrepos

Create a project group that contains members that are allowed to view and commit changes to the project. In addition, allow anyone to be able to browse the contents of the repository. This is done by editing subversion/conf/svn-access-file. To create a new group, define it and its members under the [groups] section:

[groups]
newgroup = huttone

In this case, the group is called newgroup (it doesn't have to match a repository name) and the only member of the group is huttone. Now specify the access privileges of the repository:

[newgroup:/]
* = r
@newrepos = rw

The first line indicates the repository, the second allows viewing of the repository by anyone, and the third limits commits to only group members. Change ownership of the directory to be nobody:

> sudo chown -R nobody /data/svn/newrepos

The new repository can now be viewed with a browser at https://csdms.colorado.edu/svn/newrepos. Alternatively, repositories can be browsed at https://csdms.colorado.edu/viewvc.

The Initial Import

To get you unversioned files into the svn repository, use svn import. For example:

> svn import mydir https://csdms.colorado.edu/svn/newrepos -m "Inital import"
Adding         newrepos/file1.f
Adding         newrepos/file2.f

Committed revision 1.

This copied the contents of the directory mydir into newrepos.

> svn list https://csdms.colorado.edu/svn/newrepos
file1.f
file2.f

You can now use svn checkout to get a working copy of your files.

Repository Layout

Users are free to use whatever repository layout they wish however there we recommend that you store the main development line of your code in a trunk directory, branches in a branches directory, and tags in a tags directory. Thus:

> svn list https://csdms.colorado.edu/svn/newrepos
branches/
tags/
trunk/

> svn list https://csdms.colorado.edu/svn/newrepos/trunk
file1.f
file2.f