From: Kurt Taylor <krtaylor@us.ibm.com>
Implements the show version command. If you type show version at the console, you will get the revision that opensim is running, assuming you have the .svn/entries file in your base directory (e.g. you are running from code extracted from our SVN repository) A patch to also send this to the client should follow shortly0.6.0-stable
parent
250fb6f5db
commit
5afe6c3ed9
|
@ -46,8 +46,6 @@ namespace OpenSim
|
|||
|
||||
XmlConfigurator.Configure();
|
||||
|
||||
Console.WriteLine("OpenSim " + VersionInfo.Version + "\n");
|
||||
|
||||
Console.Write("Performing compatibility checks... ");
|
||||
string supported = String.Empty;
|
||||
if (Util.IsEnvironmentSupported(ref supported))
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim
|
|||
|
||||
private string m_timedScript = "disabled";
|
||||
private Timer m_scriptTimer;
|
||||
|
||||
private string buildVersion = null;
|
||||
|
||||
public OpenSimMainConsole(IConfigSource configSource)
|
||||
: base(configSource)
|
||||
|
@ -113,6 +113,41 @@ namespace OpenSim
|
|||
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
||||
}
|
||||
PrintFileToConsole("startuplogo.txt");
|
||||
|
||||
// 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("OpenSim " + VersionInfo.Version + " r" + buildVersion + "\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.Info("OpenSim " + VersionInfo.Version + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
protected ConsoleBase CreateConsole()
|
||||
|
@ -280,7 +315,8 @@ namespace OpenSim
|
|||
m_console.Notice("show assets - show state of asset cache.");
|
||||
m_console.Notice("show users - show info about connected users.");
|
||||
m_console.Notice("show modules - shows info about loaded modules.");
|
||||
m_console.Notice("show stats - statistical information for this server not displayed in the client");
|
||||
m_console.Notice("show stats - statistical information for this server");
|
||||
m_console.Notice("show version - show the running build version.");
|
||||
m_console.Notice("threads - list threads");
|
||||
m_console.Notice("config set section field value - set a config value");
|
||||
m_console.Notice("config get section field - get a config value");
|
||||
|
@ -640,6 +676,17 @@ namespace OpenSim
|
|||
m_console.Notice("Extra sim statistics collection has not been enabled");
|
||||
}
|
||||
break;
|
||||
|
||||
case "version":
|
||||
if ((buildVersion != null) && (buildVersion.Length > 0))
|
||||
{
|
||||
m_console.Notice("The build version is: r" + buildVersion);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_console.Notice("The build version is not available");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue