From d8aaf2ccf11f67277544c5d72ed7dadd63e93ae2 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Wed, 7 May 2008 23:59:57 +0000
Subject: * For no good reason (since there are a hundred million other things
to fix), change formatting of version information printed to the log * Push
printing down into OpenSimMain so both console and consoleless configurations
will get it
---
OpenSim/Region/Application/OpenSimMain.cs | 49 +++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
(limited to 'OpenSim/Region/Application/OpenSimMain.cs')
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index f704dd2..735f662 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -53,6 +53,11 @@ namespace OpenSim
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ ///
+ /// Holds a human readable build version for this server.
+ ///
+ protected string buildVersion;
+
protected string proxyUrl;
protected int proxyOffset = 0;
@@ -337,12 +342,56 @@ namespace OpenSim
{
WorldHasComeToAnEnd.Set();
}
+
+ ///
+ /// Print the version information available to the library. This include a subversion number if the root
+ /// .svn/entries file is present.
+ ///
+ protected void printAvailableVersionInformation()
+ {
+ // Set BuildVersion String for Show version command
+ string svnFileName = "../.svn/entries";
+ string inputLine = null;
+ int strcmp;
+
+ if (File.Exists(svnFileName))
+ {
+ StreamReader EntriesFile = File.OpenText(svnFileName);
+ inputLine = EntriesFile.ReadLine();
+ while (inputLine != null)
+ {
+ // using the dir svn revision at the top of entries file
+ strcmp = String.Compare(inputLine, "dir");
+ if (strcmp == 0)
+ {
+ buildVersion = EntriesFile.ReadLine();
+ break;
+ }
+ else
+ {
+ inputLine = EntriesFile.ReadLine();
+ }
+ }
+ EntriesFile.Close();
+ }
+
+ if ((buildVersion != null) && (buildVersion.Length > 0))
+ {
+ m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + ", SVN build r" + buildVersion + "\n");
+ }
+ else
+ {
+ m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n");
+ }
+ }
///
/// Performs initialisation of the scene, such as loading configuration from disk.
///
protected void InternalStartUp()
{
+ printAvailableVersionInformation();
+
StatsManager.StartCollectingSimExtraStats();
// Do baseclass startup sequence: OpenSim.Region.ClientStack.RegionApplicationBase.StartUp
--
cgit v1.1