From 71e293c925be58b47937274224d85a8245dbb6a3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 3 Aug 2020 13:58:45 +0100 Subject: [PATCH] remove automatic code version detection from old svn repos --- OpenSim/Framework/Servers/ServerBase.cs | 45 ++----------------------- 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs index 7140e01a14..44d1361186 100755 --- a/OpenSim/Framework/Servers/ServerBase.cs +++ b/OpenSim/Framework/Servers/ServerBase.cs @@ -763,18 +763,11 @@ namespace OpenSim.Framework.Servers { string buildVersion = string.Empty; - // The subversion information is deprecated and will be removed at a later date - // 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 manualVersionFileName = ".version"; + string gitDir = "../.git/"; string gitRefPointerPath = gitDir + "HEAD"; - string svnRevisionFileName = "svn_revision"; - string svnFileName = ".svn/entries"; - string manualVersionFileName = ".version"; string inputLine; int strcmp; @@ -816,40 +809,6 @@ namespace OpenSim.Framework.Servers } } } - else - { - // Remove the else logic when subversion mirror is no longer used - if (File.Exists(svnRevisionFileName)) - { - StreamReader RevisionFile = File.OpenText(svnRevisionFileName); - buildVersion = RevisionFile.ReadLine(); - buildVersion = buildVersion.Trim(); - RevisionFile.Close(); - } - - if (string.IsNullOrEmpty(buildVersion) && 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(); - } - - m_version += string.IsNullOrEmpty(buildVersion) ? " " : ("." + buildVersion + " ").Substring(0, 6); - } } public string GetVersionText()