wiki:SubVersion

Version 4 (modified by joshuadf, 12 years ago) (diff)

--

Overview

You can browse the source using the Browse Source tab in Trac. Actual code checkin to subversion repository is accessible only via SSH, at:

svn+ssh://lamina/src

For example, list modules with

svn list svn+ssh://lamina.biostr.washington.edu/src

You don't need Subversion environment variables except optionally SVN_EDITOR (default is nano). All authentication is done via SSH. If you'd like to try it out, I recommend reading the one-page SVN Quick Start. You can skip creating the repository (the "svnadmin create /path/to/repos" step), and replace the example URL file:///path/to/repos with svn+ssh://lamina/src.

Creating a new project

Here are some quick commands to create a project using the command line, based on http://svnbook.red-bean.com/en/1.1/ch01s07.html.

PROJ=fme
svn mkdir -m "create $PROJ"  svn+ssh://lamina/src/$PROJ
svn mkdir -m "create $PROJ"  svn+ssh://lamina/src/$PROJ/trunk
svn mkdir -m "create $PROJ"  svn+ssh://lamina/src/$PROJ/tags
svn mkdir -m "create $PROJ"  svn+ssh://lamina/src/$PROJ/branches
# this will make mycode/foo appear at src/$PROJ/trunk/foo
svn import -m "$PROJ import" mycode svn+ssh://lamina/src/$PROJ/trunk

You may want to make sure everything looks good and tag the initial import:

svn list svn+ssh://lamina/src/$PROJ/trunk
# create a tag
TAG=initial-import
svn copy svn+ssh://lamina/src/$PROJ/trunk \
         svn+ssh://lamina/src/$PROJ/tags/$TAG \
      -m "Tagging the $TAG of the $PROJ project."

Converting a project

If you don't mind losing the CVS history, the easiest way is export the current HEAD from CVS, then import the files into subversion:

PROJ=mycode
cvs export -r HEAD  src/code/$PROJ
# import mycode at described above

Otherwise, investigate the steps mentioned at the SVN FAQ: Converting a project to SVN

subversion online book (local PDF copy)

Complete svn command referenece (or use svn help cmdname):

table reference of cvs vs svn commands

Attachments