Subversion: Difference between revisions
New page: <div class="title">Subversion</div> ROMS source code is distributed using [http://subversion.tigris.org Subversion](SVN). There are SVN clients available for nearly every operating system ... (change visibility) |
No edit summary (change visibility) |
||
Line 1: | Line 1: | ||
<div class="title">Subversion</div> | <div class="title">Subversion</div> | ||
ROMS source code is distributed using [http://subversion.tigris.org Subversion](SVN). There are SVN clients available for nearly every operating system and a list of popular clients can be found [http://subversion.tigris.org/links.html#clients here]. If you wish to use Subversion to maintain your own copy of ROMS you will also need an [http://subversion.tigris.org/project_packages.html svn server]. | ROMS source code is distributed using [http://subversion.tigris.org Subversion](SVN). There are SVN clients available for nearly every operating system and a list of popular clients can be found [http://subversion.tigris.org/links.html#clients here]. If you wish to use Subversion to maintain your own copy of ROMS you will also need an [http://subversion.tigris.org/project_packages.html svn server]. This page will help you get started with downloading ROMS with Subversion. | ||
==SVN Overview== | ==SVN Overview== |
Revision as of 18:04, 26 April 2007
ROMS source code is distributed using Subversion(SVN). There are SVN clients available for nearly every operating system and a list of popular clients can be found here. If you wish to use Subversion to maintain your own copy of ROMS you will also need an svn server. This page will help you get started with downloading ROMS with Subversion.
SVN Overview
Subversion is a tool for managing software development that keeps track of who modified what and allows returning to a previous version if changes don't do what was expected. All the ROMS/TOMS files are stored on www.myroms.org/svn in a repository named src. Users can check out the most recent version to their local machines with a svn client. Since this is the official version of the code, only the developers are allowed to change this repository. However, users can have their own repository on their local computer.
Below is a general description of how subversion works. Please look at the svn book for more detailed information. Brief instructions for using two GUI clients (one for PC and one for Linux) we've tried are included.
Using Subversion
In order download source code from a Subversion repository, svn client software must be installed on your local machine. If you are compiling subversion on your own be sure to build it with SSL support or you will not be able to download the ROMS source code. Most Linux distributions come with subversion (the command name is svn), so shell commands may be used without installing additional software. If your username on your local computer is not the same as your ROMS username you will need to pass the '--username <username>' option to svn; an example is given belowThe general form of subversion commands is:
svn action from to {optional_qualifiers}
To check-out the files from the ROMS repository trunk (latest version), enter (notice https instead of http):
svn checkout https://www.myroms.org/svn/src/trunk mydir
If your username on your local computer is not the same as your ROMS username you will need to pass the '--username <username>' option to svn:
svn checkout --username joe_roms https://www.myroms.org/svn/src/trunk mydir
To check-out the files from the ROMS repository branches, tags, and trunk, (this is not recomended because it takes a long time to complete) enter:
svn checkout https://www.myroms.org/svn/src mydir
You only check out once, after that, a hidden directory called .svn exists to keep track of the source, destination and a bunch of other information. Your username and password will also be saved. For more detail on command line use and syntax, see the svn book.
Several GUI front-ends to subversion exist, allowing the user to have visual prompts to help them manage their files.
Using GUI SVN Clients
Most of the GUI svn clients are very similar to each other. In this example we will use eSVN.
View the Repository
The easiest way to view a repository is to simply look at it with Trac in a web browser. Enter the URL https://www.myroms.org/projects/src (you will be prompted for your username and password), and start looking. This is also a good way to see individual files in the repository without actually downloading them.
To view the repository with eSVN, Click on the file menu and choose "Browse Repository" and enter repository URL:
Now you should be able to look at the branches, tags, and trunk. You can also navigate the repository with a web browser, but cannot do any of the version control stuff that follows.
Checkout a Copy of the Trunk
This process brings a copy of the main code from the repository to your computer and places it under svn control.
You should see a bunch of text stream by like:
svn checkout https://www.myroms.org/svn/src/trunk /home/ocean/src --username ocean --password ****** --non-interactive A /home/ocean/src/ROMS A /home/ocean/src/ROMS/License_ROMS.txt A /home/ocean/src/ROMS/Tangent A /home/ocean/src/ROMS/Tangent/tl_rho_eos.F A /home/ocean/src/ROMS/Tangent/tl_uv3dmix.F A /home/ocean/src/ROMS/Tangent/tl_def_his.F ... A /home/ocean/src/Compilers/UNICOS-mk-f90.mk A /home/ocean/src/Compilers/CYGWIN-g95.mk A /home/ocean/src/Compilers/OSF1-f90.mk A /home/ocean/src/Compilers/Darwin-ifort.mk A /home/ocean/src/Compilers/AIX-xlf.mk A /home/ocean/src/Compilers/SunOS-f95.mk A /home/ocean/src/makefile Checked out revision 11. successfully (0)