Getting the latest code

From AADoc

Jump to: navigation, search

Our source code repository at SourceForge.net contains the "latest greatest" of the Active Agenda source code. This is a Subversion repository (you'll often see it abbreviated to "SVN" or "svn"). It can be accessed via your web browser, as well as specialized client software (more below).

Contents

Web Interface

With the web interface, you can look up and read any particular file that interests you, directly in your web browser. You can study the change logs and also compare different versions of the same file. It is also possible to download and save files directly to your system, but that only allows downloading the files one by one. To get all the latest files in one go, you should use a Subversion client.

Subversion Clients

A Subversion client makes it easy to download all the files in a single operation, and also lets you keep updating your system as we commit new changes to the repository. For an extensive list of available Subversion client applications, see this Wikipedia article, or the "Clients and plugins" list at this page on the Subversion site.

Below are recommended clients that we use ourselves.

Linux/Unix and similar

The standard "svn" command-line client is recommended for anyone who is comfortable with using the console. Graphical clients do exist (but we have only tried a few, like eSVN).

If you're running Linux, install the subversion package via your program installer (which is called something different depending on distribution). In Kubuntu (my current favorite), the command is:

sudo aptitude install subversion

The documentation for Subversion does a great job of explaining how to use the program.

Windows

On the Windows platform, our experience with TortoiseSVN has been excellent. It integrates as a plugin into Windows Explorer and provides access to the Subversion commands via additional menu items on the right-click menu.

To install TortoiseSVN, download and run the installer from http://tortoisesvn.net/downloads. The documentation for TortoiseSVN is also great.

Running the latest Active Agenda on your computer

By using a subversion client, it is easy to follow the development of new features in Active Agenda. This should be done for testing/learning/evaluation purposes only, not "production".

The following "recipe" assumes that you have installed the SVN client of your choice, as well as the general requirements.

1. Download the latest release from http://www.sourceforge.net/projects/activeagenda

2. Follow the general general installation procedure: Edit the config.php and gen-config.php files. Install the database. Configure the web server and test that all is working.

3. Re-name the s2a folder to s2a_release.

4. Use your Subversion client to check out the latest source from https://activeagenda.svn.sourceforge.net/svnroot/activeagenda/trunk into a new s2a folder in the same parent folder as your s2a_release folder.

Using the svn client, it would be done like this:

$ cd /path/to/s2a-parent
$ svn checkout https://activeagenda.svn.sourceforge.net/svnroot/activeagenda/trunk s2a

In TortoiseSVN, you would right-click in the correct folder (parent of s2a_release) and find the TortoiseSVN->Checkout... menu item. In the dialog box, enter the URL https://activeagenda.svn.sourceforge.net/svnroot/activeagenda/trunk and make sure it places the checked out contents in a new s2a folder: C:\path\to\s2a-parent\s2a.

5. Now we need to copy some files and folders from the s2a_release folder to the same location in the new s2a folder tree:

active_agenda/config.php
active_agenda/gen-config.php
active_agenda/uploads

6. Generate all modules with the s2a.php script (see the Generating a Module article).

cd /path/to/s2a
php s2a.php

Depending on the changes that have occurred since the latest release, you may be prompted to allow database table modifications. There is also a possibility that dependencies with not-yet-generated modules cause a module to fail with an error message: after the other module has been generated, you can simply re-try the failed module again (the script will prompt you once).

7. You should now have the latest code running on your server.

Check that file permissions allow error messages to be saved in active_agenda/s2alog/errors.log (web server must have write permissions to this file), as well as active_agenda/uploads.


Staying up-to-date

In order to know when new changes have been committed to the source code repository, you can sign up to the activeagenda-svn mailing list, and you'll get notified of every commit (there's the choice of getting daily summaries instead).

Whenever you want to sync your server to the latest source code all you have to do is use the "update" command of your Subversion client. The SVN client is smart enough to preserve any modifications you have made. However, merging conflicts can occur (see the svn or TortoiseSVN documentations, respectively).

svn:

$ cd /path/to/s2a
$ svn update

TortoiseSVN: Right-click on the s2a folder and choose TortoiseSVN->Update.

Re-generating modules

Because of the nature of how the application is designed, many changes to the code will require that one or more modules are re-generated. The easiest policy regarding this is to simply always re-generate all modules after an SVN update.

If you would like to know some general rules of thumb, expect that files modified in the s2a/active_agenda/xml folder or s2a/lib/templates will always require re-generating. Similarly, changes inside the s2a/active_agenda/web folder will typically never trigger the need for re-generating.

Personal tools