Feature Wiki

Information about planned and released features

Tabs

Display SVN-Revision

1 Requirements

Most ILIAS-Installations are directly synced from a SVN-Repository. It would be nice to show the SVN-Revision in the Adminstration. Technically this is possible - compare the following stand-alone-script as a proof of concept:
 
revision.php:
<?php
/** * when this instance of ilias was installed by using svn checkout, * this script prints the currently checked out revision *  * @author Björn Heyser <bheyser@databay.de> * @version $Id: revision.php 38416 2012-11-27 09:54:51Z bheyser $ */
 
function isSvnRevision($revision){ return (bool)preg_match('/^\d+(:\d+)*[MSP]*$/', $revision);}
$success = false;
echo '<pre>';
 
// determine global revision with shell_exec() and svnversion command
if( function_exists('shell_exec') && is_callable('shell_exec') ){ $revision = trim(shell_exec('svnversion')); if( isSvnRevision($revision) ) { $success = true; echo "global revision:\t$revision\n"; }}
 
// determine global revision with parsing of svn file
$filename = '.svn/entries';
if( file_exists($filename) && is_file($filename) && is_readable($filename) ){ $svnfile = file($filename); $revision = $svnfile[3]; if( isSvnRevision($revision) ) { $success = true; echo "revision of root:\t$revision\n"; }}
 
// print error if required
if( !$success ){ echo "Could not determine current svn revision!\n";}
 
echo '</pre>';

2 Status

3 Additional Information

  • If you want to know more about this feature, its implementation or funding, please contact: Databay

4 Discussion

JF 5 Feb 2013: We highly appreciate the feature and schedule it for 4.4. The information should be displayed on the Administation > Server Data screen (under ILIAS version).

MJ 16 Aug 2013: Implemented

BH 14 Aug 2014: The current imlementation of this feature lets the administration server tab load for about five minutes and more in some (large) installations. This isn't acceptable, so we have to change the behaviour I think.
 
Our suggestion is to not invoke this information query unless an admin decides to by clicking a toolbar button. The queried information could be displayed in an ilUtil::sendMessage().

JF 18 Aug 2014: We support the usability fix suggested by Björn.

5 Implementation

Last edited: 17. Apr 2025, 15:01, Kunkel, Matthias [mkunkel]