Mantis#1685. Thank you kindly, Mjm for a patch that:

The attached patch tries to read the SVN revision from local file 
"svn_revision" before checking "../.svn/entries".
This allows simulators not running from the source tree to properly 
display the SVN revision, if the installer generates the 
"svn_revision" file.
0.6.0-stable
Charles Krinke 2008-07-08 01:11:52 +00:00
parent 66cf44f06a
commit 1122f3f693
1 changed files with 12 additions and 1 deletions

View File

@ -230,13 +230,24 @@ namespace OpenSim.Framework.Servers
string buildVersion = string.Empty;
// Add subversion revision information if available
// Try file "svn_revision" in the current directory first, then the .svn info.
// This allows to make the revision available in simulators not running from the source tree.
// FIXME: Making an assumption about the directory we're currently in - we do this all over the place
// elsewhere as well
string svnRevisionFileName = "svn_revision";
string svnFileName = "../.svn/entries";
string inputLine;
int strcmp;
if (File.Exists(svnFileName))
if (File.Exists(svnRevisionFileName))
{
StreamReader RevisionFile = File.OpenText(svnRevisionFileName);
buildVersion = RevisionFile.ReadLine();
buildVersion.Trim();
RevisionFile.Close();
}
if (string.IsNullOrEmpty(buildVersion) && File.Exists(svnFileName))
{
StreamReader EntriesFile = File.OpenText(svnFileName);
inputLine = EntriesFile.ReadLine();