FM /


Documentation for the fmethods group courses repositories.

In which you will learn:

  1. How the system repository-webpage is structured
  2. How to update the system from one academic year to the other.

You need to be part of the fmethods group. Either ask Wolfgang Ahrendt ( or the IT service.

From now on let's assume we deal with the TDV repository. Analogous concepts hold for SEFM.


In the scenario there are three actors:

  • The remote repository (the server). The repositories for SEFM and TDV reside in the repository
    where <chalmers_remote> is any of the servers you have access to Chalmers. It is actually a single repository, which has at its root the directory "courses" which differentiates between TDV and SEFM. If you do not remember this address after pulling the repo, you can find it in
    file at the top level of the local repository.
  • The local repository (you with your computer). Pull down the repository issuing the command (assuming you have svn installed)
    svn co svn+ssh://<chalmers-remote>/chalmers/groups/fmethods/home/svn/courses/TDV/
    (or alternatively SEFM instead of TDV)
  • The proxied repository. A checked-out portion of the remote repository which resides in the webserver (thus exposed to the public -- it is where the published page resides). It is in the addresses
    The latter one is a symbolic link to the former. Note that the above is for TDA, for SEFM it is valid mutatis mutandis.


The repository for each course contains a "Web" directory. This directory contains what is published on the Chalmers course page. Every time you commit a change to any versioned object in that directory:

  1. you commit via the local repository;
  2. the repository accepts the commit
  3. the repository executes the script
    which calls in turn update<X>web (<X> being TDV or SEFM)
  4. ... which issues an update command in the proxied repository.


So a new academic year is starting and you panic because you have to update the site. No problemo! The next subsections describe how to do it.


  1. log on to the remote server via ssh: from a shell of your pc issue
You have to substitute your username (here is gabpag). The following string is the remote chalmers server address, you might want to create local aliases for that on your local computer.
  1. Issue the following commands:
cd /chalmers/groups/edu2009/www/${current_year}/course/ (the directory should be there by the time you are panicking)
mkdir TDA566_Testing_debugging_and_verification
ln --symbolic TDA566_Testing_debugging_and_verification TDA566
to create the necessary directories and symbolic links.


In the directory of the previous point issue

This creates the proxied repository. Make sure you permissions are ok: issue

chmod 774 * -R

in the same directory.


Change to directory

cd /chalmers/groups/fmethods/home/svn/hooks
  1. Edit the bash script updateTDVweb by replacing all occurrences of ${current_year-1} to ${current_year} (e.g. if you are doing this in 2014, you should replace all 2013 with 2014).
  2. Edit the bash script post-commit by uncommenting as it is explained in the documentation therein.

In this way any time you push a commit from your local repository, the remote issues the update command in the proxied repository (because the SVN remote executes post-commit when it receives a commit)

Final remarks:

LOOK OUT! NEVER, EVER INTERACT WITH THE proxied repository unless there is no alternative. It is supposed to be just a repository that reads. If you want to do changes to the webpage, do it from your local repository!

IMPORTANT! Remember to do SOMETHING if you want to prevent students from accessing the old year's website!

DESIGN DECISIONS. The SEFM and TDV logical repositories are in the same physical repository. This means that if you commit on TDV, also the proxied repository of SEFM will be updated (hopefully with no changes.) In the


script this is avoided by manually commenting in/out the calls to the update scripts for the SEFM and TDV websites. The idea is that since the two courses take place in different time periods one can manually do this. If things seem not to update, take a look at it as you might have forgot to uncomment the right line.


  • Some of the design decisions are not clear to me, surely they were to he who built all this. Some of the reasons behind them might not hold anymore, so feel free to subvert the status quo.
  • The above algorithm can be coded smartly with a bash script, and made so that manteinance will be almost null. It should be an easy task, and I strongly recommend to do this.
  • The websites rely on Server-side includes (SSI). If this sounds new to you make sure you understand what it is and how it is used in the website or ask somebody else in the group for help.
  • This page should disappear shortly once the above process is automated, of course if somebody or something deletes it because it will be obsolete. If you are reading this in 2035, then surely something went wrong.