Let's start OSS development with Subversion (SVN)


Let’s start OSS development with Subversion (SVN)

At OSDN, we provide various functions to support development which uses Subversion.

Create personal Subversion repository Create Project
Subversion icon svn-name-banner

What is Subversion

Subversion (Apache Subversion) is a source code control system that is widely used to develop wide variety of softwares. It is often abbreviated to svn for having general command-line client/protocol for its name. With subversion, source code and modifications that are added there are all recorded at the central repository, and it is equipped with centralized version control function which allows each developer to pull out source code by accessing central repository via network, and record modifications. It can be used for all kinds of environment such as Windows, Linux, Mac OS X, and various kinds of UNIXs. There are many GUI clients and IDEs (integrated development environment) equipped with version control function through the use of Subversion.

Features of Subversion

Subversion adopts architecture which allows multiple developers to access the single central repository. For each committed modification, a new revision number is given, so not only version control can be carried out intuitively but also there are many available clients. On the other hand, because multiple developers share a single repository, there’s a disadvantage that rivalry over making same modification is likely to happen. Recently, Subversion is slowly losing share to distributed source code control systems such as Git and Mercurial, but because it’s been out there longer, it is still chosen by many software developments.

At Subversion, the flow of development is as follows: pull out source code from the central repository with checkout or update command, then after making a modification, execute the commit to send the modification to the central repository. Upon checkout, if some other developer is committing a new change to the repository, you will not be able to commit so you may have to pull out source code once again from the repository and have to go through with the merge procedure which will reflect the newly added modification to the code of your location. There are also other functions, and one is called branch which is used for a parallel control of multiple different version source codes, and another function is called tag which gives a name to a certain version to control.

Basic Commands of Subversion (svn)

To use Subversion, you will need a client. There are GUI clients like TortoiseSVN for Windows, but in a Linux/UNIX environment, command-line based svn commands are often used. For example, in order to checkout a file using a svn command, use “svn checkout” command or the abbreviated version “svn co”.

$ svn checkout [URL of the repository you are checking out]

Once you execute the “svn checkout” command, you can pull out a file from the assigned repository and it will be checked out as a directory. Also, to update a file which you have checked out before to the latest version, use the “svn update” command.

$ svn update

To add a change to the checked-out file and save it in the repository, execute “svn commit” command or the abbreviated version “svn ci”.

$ svn commit -m [commit message]

At this point, for a commit message, you will have to define what change you have made. If you happen to omit the commit message, editor will automatically pop up, and there you will have to write in the commit message.

If you want to add another file, use “svn add” command, and if you want to delete a file, use “svn delete” command (or “svn del”, “svn remove”, “svn rm”).

$ svn add [name of the file you want to add]
$ svn delete [name of the file you want to delete]

In cases you want to add a file to an empty repository, use “svn import” command.

$ svn [file/directory you want to add] [URL of the repository]

If you assign a directory here, a file within the directory or the directory will be added recursively to the repository. And if you omit a file or directory, it will be executed as having added current directory.

Subversion Viewer

Subversion Support Offered by OSDN

OSDN offers Subversion support services.

  • Subversion repository for PersonalForge, personal development support function
  • Subversion repository for development project
  • Svn command support through the use of free-of-charge shell server/Web server

You can use all these functions free of charge once you create an OSDN account. There are no restrictions to the number and size of the repository to create.

Create Subversion Repository

Subversion Repository for PersonalForge, Support Function for Personal Development

PersonalForge is a support service for personal development. With PersonalForge, you can use Chamber which is provided with functions such as personal repository, file uploader, and Wiki. You can create as many Chambers as you wish and upload any files.

PersonalForge provides repository browser originally developed by OSDN, and you can browse any list of brach files, commit history, list of branch/tag on Web browser.

SCM for project

Subversion Repository for Development Project

Project function for open-source software development provides source code management system. You can use source code management systems such as Git, Subversion, Mercurial, Bazaar, and CVS. For Git, Subversion, and Mercurial, there is repository browser originally developed by OSDN.

There are also other functions designed for projects such as Wiki, file release (uploader), ticket, news, forum (bulletin board), and mailing list.

SVN Command Support on Free-of-Charge Shell Server/ Web Server

OSDN provides shell server which you can use for testing softwares developed by the project, and structuring web sites. You can log into shell server using SSH or you could use MySQL database. Git, svn, and hg commands are installed on the shell server, so you can use these to copy files to the shell server.

Create personal Subversion repository Create Project