Checking out the code
IMPORTANT: Before installing the TM5 code, we recommend that you familiarize yourself with its structure, particularly if you will not check out the entire repository.
IMPORTANT: If you get error messages "SSL handshake failed..", switch from https to http. See SVN issues.
IMPORTANT: Remember to accept permanently the repository certificate. See Accessing the repository.
1st method (full checkout)
You can get the entire repository in one go with:
svn co https://svn.knmi.nl/svn/TM5
This will checkout everything (all branches, releases, and projects, as well as the old TM, since it is there too). You would end up with a copy of the code in a TM5 directory created where you called svn checkout.
The main advantage of this method is that you have one global tree directory under version control. Several important svn operations are then easy, particularly getting the status or updating your code. For example:
cd TM5 svn st svn up
The whole code is somewhat large (614 Mb as of 2012-11-13), which can be an issue on some systems where resources are scarce. Since you probably do not need the entire repository, it is possible to checkout only part of it if the TM5 size is an issue. The method hereafter (selective checkout) will show you how to do.
To complete the check-out, you need to have a couple of scripts linked and an rc file to start with:
cd TM5 ln -s -f base/trunk/py/rc.py ./rc.py ln -s -f base/trunk/bin/pycasso_setup_tm5 ./setup_tm5 cp base/trunk/rc/tm5_template_base.rc mytm5.rc # for a base (no chemistry) runs cp base/trunk/rc/tm5_template_chem.rc mytm5.rc # for a chemistry runs
2nd method (selective checkout)
Note: requires python 2.7, if you have an older version, replace 'install_tm' with 'install_tm_oldpy' in all the commands below.
Get the installer script:
Now select the TM sub-projects you want by executing:
or, if you get the error message "SSL handshake failed...",:
./install_tm -a -u USERNAME -p PASSWORD
and answer each questions (default choices are indicated). The script can always be re-run to install additional projects, but keep in mind that if you are using SVN 1.6 you will not be able to "checkout the parent directory of an already checked-out directory". You may ask your advisor, colleague or one of the TM5 projects administrators for recommendations about which projects to select. For testing the benchmark (and the chemistry), choose the following:
base/trunk base/release # for using release 4 base/branches/TM6 # for using TM5-mp proj/user_output proj/budget proj/chem/base
In this configuration, the various checkouts are not tied together: updating (or getting the status of) your copy of the code requires updating (or getting the status of) the directories you checkout one by one.
Getting just one file
To get a simple (i.e. not versioned) copy of just one file, you do not need wget or ftp (that won't work). Just use the svn command export. For example:
Note on recursivity of some svn commands and TM5 projects
In all cases (except the 1st whole checkout), some svn commands (like "svn update") are not applied recursively down the directory tree, like they would if you have checked out the entire TM5. You must go to each of the checked-out directory to work with their content in a version control way. You can use SVNTREE or XSVN as script examples that let you do that in an automatic way. See the tools.
Switch from the Maunaloa repository
Before 2010, the TM5 svn repository was hosted on Maunaloa server at Wageningen University. If you have been using the Maunaloa server for TM5, you must update your TM5 copy to keep enjoying all svn features. You just need to tell your copy that the URL of your repos has changed.
- 1- go to a directory, which is a "svn working copy". It is a directory where there is a ".svn" directory. You can check that this is a working copy and the Repository root URL in one call:
svn info | grep Root
- 2- call:
svn switch --relocate https://maunaloa.wur.nl/subversion/TM5 https://svn.knmi.nl/svn/TM5
- 3- The command works recursively, so you need not repeat it in every sub-directories, just find the highest directory(ies) with a .svn folder. A script, which will crawl directories to find those with a .svn and apply a svn command there for you, is now available. Get it here:
- or the more general tool:
- 4- you can double check that the repos URL has been modified by reissuing:
svn info | grep Root