Revised 2006-09-05 DMB

Return to the Index

Using Subversion to Obtain Avida

Avida is a collaborative project developed and maintained by developers and researchers around the world. In order to manage the changes from concurrent development, the Avida source code is maintained within repository software called Subversion or SVN. This document provides directions for obtaining the current source code via anonymous SVN Web-DAV checkout.

Subversion client software can be obtained from at


Using Subversion

Under Unix platforms (Linux, Solaris, OS X), Subversion is used via the command line. You issue commands by typing "svn command" where you replace command with the command you wish to issue.

To download the Avida project, issue the 'checkout' command with the path to the Avida repository. The following two command lines show how this command should look and provide the repository paths. The first line is the preferred path. The second can be used in instances where outbound firewalls have blocked access to non-standard web ports.

svn checkout
svn checkout

When a project is downloaded from the Subversion, it will also create a new sub-directory inside of each project-directory, called .svn/. This lets future SVN commands know the status of all your files and what project they are part of, so you should never need to tell it again.

Here are some of other commands that you can execute inside of a project that you have retrieved from the Subversion:

svn update
This command will incorporate all changes anyone else has made in the project since last time you downloaded it. If you have made any changes to the project yourself, it will merge those changes.
svn status
This command will tell you the status of each file in the within your working copy. Supplying the option --show-updates will show you updates that have occurred within the repository.
cvs diff <filename>
This command will show you any changes that you have made to the file since it was last updated.
svn help
Prints a list of all available commands, with a brief description of each.

If you are just using the SVN in order to have the most up-to-date version of Avida, than you should never have any problems with it. An occasional "svn update" when you need a newly implemented feature should do the trick. However, if you are going to edit the code (even if you never plan to commit your changes) there are some other things you need to worry about.

In particular, what happens if both you and someone else edit the source code at the same time? Well, in fact the SVN is very good at handling this. If they are two different files, then there is no problem at all. If they are even the same file, but different sections of it, this generally isn't a problem either -- the SVN will merge the changes smoothly and correctly. The real problem is when two people edit the same part of the same file.

When this happens and you try to update, the Subversion will list files in the update messages with a C in the first column. After the update, when you edit the file, you will see that there will be a ">>>>>>>>>>" on one line in the file, followed by your edits, then a "===========" and the other persons edits, and finally a "<<<<<<<<<<" to indicate the end of the other persons edits. It is now your job to merge your edits with theirs. Most of the time this is caused by two people trying to fix the same bug, and you can just choose one edit or the other and either will work just fine.

Return to the Index