wiki:SubVersion

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

--

Overview

You can browse the source using the Browse Source tab in Trac.

With Subclipse plugin

IBM Devworks has a How to use Subversion with Eclipse tutorial

  • Install Ecplise 3.2
  • Install plugin from http://subclipse.tigris.org/update_1.2.x and restart Eclipse
  • For Windows, set:
    • Window->Preferences
    • Team->SVN
    • Choose "JavaSVN (Pure Java)" instead of JavaHL
  • Window->Open Perspective->Other... and select "SVN Repository Exploring"
  • right-click and New->"Repository Location..."
  • in the dialog box URL put: svn+ssh://lamina.biostr.washington.edu/src
  • enter username/password for SSH

trac Integration

When you commit code, your comments can be automatically added to trac tickets, or even close them if you use some magic words.

For example, the commit comment in changeset [85] was:

On each ticket page, this appears as:

(In your commit comments, you can also use any Wiki formating to link to the Wiki.) The full syntax is in the comments of the script's source.

Command Line

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