How To CSDMS Subversion

From CSDMS
Revision as of 15:27, 7 July 2009 by Huttone (talk | contribs) (Update for new server)

Create a CSDMS subversion repository

First of all, our subversion repository is located on river at: /data/svn. To add a new user: <geshi> > /usr/bin/htdigest /data/svn/conf/svn-auth-file Subversion <username> </geshi> 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): <geshi> > svnadmin create /data/svn/newrepos </geshi> 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: <geshi> [groups] newgroup = huttone </geshi> 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: <geshi> [newgroup:/]

  • = r

@newrepos = rw </geshi> 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: <geshi lang=bash> > sudo chown -R nobody /mysticplum/data/subversion/newrepos </geshi> The new repository can now be viewed with a browser at https://csdms.colorado.edu/svn/newrepos.

The Initial Import

To get you unversioned files into the svn repository, use svn import. For example: <geshi> > svn import mydir https://csdms.colorado.edu/svn/newrepos -m "Inital import" Adding newrepos/file1.f Adding newrepos/file2.f

Committed revision 1. </geshi>

This copied the contents of the directory mydir into newrepos. <geshi> > svn list https://csdms.colorado.edu/svn/newrepos file1.f file2.f </geshi> 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: <geshi lang=bash> > svn list https://csdms.colorado.edu/svn/newrepos branches/ tags/ trunk/

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