Slides
Major SVN Differences
CVS SVN
revision numbers per file per filesystem tree
conflict resolution user responsible for remembering can't commit until conflicts resolved
authentication login to do anything (read/write), even for anonymous operations login as operations require
Basic SVN Commands

Create a repository

svnadmin create [repository]

For CVS (assumes $CVSROOT defined and exists):

cvs init

Import files into repository

svn import [local path] [URL] -m ""

Note that subversion doesn't automatically create a new directory in your repository for you, you need to tell it in the URL exactly what directory you want the new files to be imported to. Also, if you cd into the folder you want to add as a new project, you can leave out the [local path].

Example

svn import file:///home/gibson/repository/trivia -m "Initial import"

Compare with CVS:

cvs [-d cvs repository:/usa/gibson/cvs/] import -m 'Initial' [module:trivia] [vendor tag:CISGSA] [tag:start]

URL schemas:

  • file (local)
  • svn (svnserve servers)
  • svn+ssh (svnserve tunneled through ssh)

Checking out a project

svn co URL [local dir]

where the locat directory is optional: default is the URL directory.

Committing changes

svn ci -m "Message"

Adding, removing
Almost identical to cvs.

Get revision history

svn log [URL]

Checkout previous version
Append -r [revision number] to the co command. To figure out what revision number you'd like to check out, just look at the log.

Diffing with a previous version
With current working copy

svn diff -r N

Compare revisions N-M

svn diff -r N:M