You can browse the source using the Browse Source tab in Trac. Also, don't miss our EclipseHints and maybe OpenSsh too.

Command Line

Actual code checkin to subversion repository is accessible only via SSH via location svn+ssh://

For example, list modules with

svn list svn+ssh://

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://

Checking out one file

Sometimes you need to edit just one file in a large project. Subversion supports sparse checkout:

svn checkout svn+ssh://$PROJ/trunk --depth empty
cd $PROJ/trunk
svn up <file_you_want>
# edit file
svn commit -m 'awesome edit'

Creating a new project

Here are some quick commands to create a project using the command line, based on

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

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

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

Subclipse plugin

IBM Devworks has a How to use Subversion with Eclipse tutorial

  • Install Ecplise
  • Install SubClipse plugin from and restart Eclipse
  • On 64-bit Windows or Mac, you may need a separate JavaHL download
  • If that doesn't work, on Windows, set:
    • Window->Preferences
    • Team->SVN
    • Choose "SVNKit (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://
  • enter username/password for SSH

trac Integration

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

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

On each ticket page, this automatically appears as:

You may optionally put the word "ticket" before the "#" (i.e., "addresses ticket #5"). The full syntax is in the trac-post-commit-hook script.

In your commit comments, you can also use any WikiFormatting to link the changeset and tickets to wiki pages.

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:

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

Notes on adding AppleScript SVN menu tools (primarily for non-developers)

Last modified 6 years ago Last modified on 03/03/14 15:20:42

Attachments (3)