Basic SVN Operations

Apache Subversion (often abbreviated SVN, after the command name svn) is a software versioning and revision control system distributed as free software under the Apache License. Developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation.

(See also Basic Git Operations)

We will show you some basic features, concepts and operations used in Apache Subversion software.

SVN Features:

  • Client-Server Architecture
  • Server logs every changes made on directories
  • Supports moving and copying files
  • Available tagging
  • Stable version labeled
  • Possible branching

SVN Concepts:

  • File and directory manipulation
  • Every directory represents separate repository
  • Every user has only working directory, changes are located in central repository
  • Network is required to view history of changes

Basic SVN Operations:

svn import <repository_url>

Creates working directory in repository (used on start of the project).

svn checkout <repository_url>

Copy latest version from repository into working directory.

svn add

Adds a new file which wasn’t versioned before. It will be in a repository with next commit.

svn update

Updates working directory with the latest version from repository. Possible conflicts with merging. Can be solved with merging tools.

svn commit

Sends working version into repository so it becomes the new main version.

svn status

Shows differences from working directory and repository.

svn remove <file>

Deletes file and marks it for removing on the next commit.

svn cp <file>

Copies file you specified in the command.

svn mv <file>

Moves file you specified in the command.


SVN Usage Example:

Here is some example how can SVN be used:

svn checkout <repository_url>
# ...
# making changes
# ...
svn commit
# ...
# new changes
# ...
svn update
# ...
# modifying files
# ...
svn commit

For more informations you can visit official Subversion website:

https://subversion.apache.org/

 

Leave a Reply

Your email address will not be published.