Subversion. Tips and Tricks

Subversion. Tips and Tricks

About Subversion

Subversion (SVN) is centralized revision control version. That┬ámeans you have one central server and many SVN clients installed on developer’s workstations. When a developer commits, code updates are sent to the server immediately (in contrast to Git, where commits stored in local repositories and pushed to the central repository manually).

Anyway SVN is very old and inflexible revision control system – it has many disadvantages comparing with Git. But it is used for some old projects and it can be useful to know some basic SVN commands.

Get last revision from the repository
svn update
Switch (revert) whole project to a particular revision
svn update -r 9
Switch (revert) single file to a particular revision
svn up -r 147 myfile.py
Save changes (commit) to the repository
 svn ci -m "Commit description"

Note: if you get error “Command: Update Error: Previous operation has not finished;”, then try

svn cleanup

and then try to commit again

Commit a single file
svn ci -m "Commit description" php\file.php
Author: vlad