riedquat - valueable resource for those who seek.
Home Blog Technical Reports Art Articles RapiDocs Coding Links Reviews Projects: CherBot Daimonin Gridarta

SVN Destillate

Basics

Subversion (SVN) is a version control system. A version control system performs the task of tracking changes and versions of files. Usually, version control systems are mainly used by software developers.

An SVN Repository is a kind of virtual server for version control.

When working with SVN, you'll work like this:

  1. Create a Sandbox.
  2. Make local Changes.
  3. Regularly Update your sandbox.
  4. Delete changes you don't feel content with.
  5. Commit changes you're content with.
  6. Repeat 2. through 5. as required.

For migrators from other version control / configuration management systems

User Commands

Create a sandbox
svn checkout svn+ssh://host/pathToModule

To execute the following commands, you must be in a sandbox.

Update your working copy (sandbox)
svn update
Make changes
  • svn add
  • svn delete
  • svn copy
  • svn move
Examine your changes
  • svn status
  • svn diff
  • svn revert
Merge others' changes into your working copy
  • svn update
  • svn resolved
Commit your changes
svn commit

The golden rules

Status Output

The characters printed by the command status have the following meaning:

Server Admin

Create a repository
  1. svnadmin create --fs-type fsfs /home/svnroot
Create a module (way 1)
mkdir tmpdir
cd tmpdir
mkdir -p prjNam/{trunk,branches,tags}
svn import . file:///path/to/repos --message 'Initial repository layout'
Run svnserve (optional, only for svnserve access)
Add the following lines to /etc/services:
svn           3690/tcp   # Subversion
svn           3690/udp   # Subversion
Add the following line to /etc/inetd.conf:
svn stream tcp nowait svnowner /usr/bin/svnserve svnserve -i
With svnowner being a user with appropriate permissions to access your repositories.
show
 . 
..: