next up previous contents
Next: Creating and accessing a Up: What is Subversion? Previous: The Concept of a   Contents

A Short Session with Subversion

The session will consist of creating a Subversion repository accessed via file:// scheme for simplicity and doing some basic operations on it. The full meaning of the commands will not be explained in this subsection.

The command

$ svnadmin create /tmp/svnrepo

creates a repository in /tmp/svnrepo and is ready to store projects. If we have such a project in  /drafts/java/helloworld, we can import in the repository with the following commands:

$ cd ~/drafts/java/helloworld
$ svn import -m ``initial import`` file:///tmp/svnrepo/helloworld

Checking out of a working copy in the current directory is preformed with the command

$ svn co file:///tmp/svnrepo/helloworld

After we have checked it out we can edit and commit files:

$ echo ``Important text`` >> readme.txt
$ svn ci -m ``added important text`` readme.txt

A new file is added in the following way:

$ echo ``Install notes`` > install.txt
$ svn add install.txt
$ svn ci -m ``install notes`` install.txt

The local copy is updated using the command

$ svn update

The comments for the different revisions are reviewed with the command

$ svn log



Ivan Ivanov 2008-04-21