diff options
author | Charles Krinke | 2008-07-08 01:11:52 +0000 |
---|---|---|
committer | Charles Krinke | 2008-07-08 01:11:52 +0000 |
commit | 1122f3f693584b737d64d053d956c83159712102 (patch) | |
tree | aa0ca091274c65173aadfd6e754bf5b8a0b41bf6 /OpenSim/Framework/Servers/BaseOpenSimServer.cs | |
parent | Mantis#1681. Adding Vytek's submittal of DotNetOpenMail.dll (diff) | |
download | opensim-SC_OLD-1122f3f693584b737d64d053d956c83159712102.zip opensim-SC_OLD-1122f3f693584b737d64d053d956c83159712102.tar.gz opensim-SC_OLD-1122f3f693584b737d64d053d956c83159712102.tar.bz2 opensim-SC_OLD-1122f3f693584b737d64d053d956c83159712102.tar.xz |
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.
Diffstat (limited to 'OpenSim/Framework/Servers/BaseOpenSimServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 62177a6..dac784e 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -230,13 +230,24 @@ namespace OpenSim.Framework.Servers | |||
230 | string buildVersion = string.Empty; | 230 | string buildVersion = string.Empty; |
231 | 231 | ||
232 | // Add subversion revision information if available | 232 | // Add subversion revision information if available |
233 | // Try file "svn_revision" in the current directory first, then the .svn info. | ||
234 | // This allows to make the revision available in simulators not running from the source tree. | ||
233 | // FIXME: Making an assumption about the directory we're currently in - we do this all over the place | 235 | // FIXME: Making an assumption about the directory we're currently in - we do this all over the place |
234 | // elsewhere as well | 236 | // elsewhere as well |
237 | string svnRevisionFileName = "svn_revision"; | ||
235 | string svnFileName = "../.svn/entries"; | 238 | string svnFileName = "../.svn/entries"; |
236 | string inputLine; | 239 | string inputLine; |
237 | int strcmp; | 240 | int strcmp; |
238 | 241 | ||
239 | if (File.Exists(svnFileName)) | 242 | if (File.Exists(svnRevisionFileName)) |
243 | { | ||
244 | StreamReader RevisionFile = File.OpenText(svnRevisionFileName); | ||
245 | buildVersion = RevisionFile.ReadLine(); | ||
246 | buildVersion.Trim(); | ||
247 | RevisionFile.Close(); | ||
248 | } | ||
249 | |||
250 | if (string.IsNullOrEmpty(buildVersion) && File.Exists(svnFileName)) | ||
240 | { | 251 | { |
241 | StreamReader EntriesFile = File.OpenText(svnFileName); | 252 | StreamReader EntriesFile = File.OpenText(svnFileName); |
242 | inputLine = EntriesFile.ReadLine(); | 253 | inputLine = EntriesFile.ReadLine(); |