Revision 7484 (by gradha, 2006/08/26 17:58:56) Added note about performance test.
======================================
SourceForge cron script gen_svn_log.sh
======================================

This is a small document for SourceForge administrators reviewing the
crontab entry used to update the SVN logs available at the Allegro
web page.


Contents:
  1. `Purpose of the script`_
  2. `Contact`_
  3. `Current user running this script`_


Purpose of the script
=====================

The script ``gen_svn_log.sh`` is stored in the ``allegrowww`` module just
like the rest of the web page source. The purpose of the script is to
list the SVN log contents into a full gzipped text file, a full gzipped
xml file, and a small uncompressed text extract of the last 500 lines.

The script is run every hour per monitored branch. However, it does some
clever tricks with the checked out revision number to avoid regenerating
the full logs if there have been no modifications.  In the most optimal
situation, a simple svn update operation is performed on a locally checked
out directory, and nothing else. In the worst case, two svn log commands
will be run, their output piped through gzip and copied to a directory
where web browsers can read the files.

For reference, on 2006-08-26 an interactive test was performed with
the time command. When the logs had to be regenerated from scratch
due to updates, the script spent 16 seconds. The second run (and
just any other run) spent 1 second or less because no modification
was done to the repository in the meantime.

In case of strange problems or lockups, the script avoids rerunning
itself more than once through the use of lock files.


Contact
=======

Should problems arise, and the author of the cron
entry not answer emails, you can send an email to
alleg-developers@lists.sourceforge.net, where other administrators
of the Allegro project are available.


Current user running this script
================================

Right now the user ``gradha`` is running this script from his crontab.