From 373ef594baeb7213f1f97c6bf444b7d348f25104 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 11 Dec 2010 01:57:32 +0000 Subject: Drop current OAR version back to 0.5 since these are currently now compatible with older OpenSim versions again. Removed ability to choose 0.4 to avoid having to write code that polices this properly. Please shout on the ml if you really need this. --- OpenSim/Region/Application/OpenSim.cs | 7 ++- .../World/Archiver/ArchiveWriteRequestExecution.cs | 3 +- .../Archiver/ArchiveWriteRequestPreparation.cs | 64 +++++++++++----------- .../CoreModules/World/Archiver/ArchiverModule.cs | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ae2d836..c2dd84c 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -265,10 +265,11 @@ namespace OpenSim LoadOar); m_console.Commands.AddCommand("region", false, "save oar", - "save oar [-v|--version=] [-p|--profile=] []", + //"save oar [-v|--version=] [-p|--profile=] []", + "save oar [-p|--profile=] []", "Save a region's data to an OAR archive.", - "-v|--version= generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine - + "-p|--profile= adds the url of the profile service to the saved user information" + Environment.NewLine +// "-v|--version= generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine + "-p|--profile= adds the url of the profile service to the saved user information" + Environment.NewLine + "The OAR path must be a filesystem path." + " If this is not given then the oar is saved to region.oar in the current directory.", SaveOar); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index f8a599a..9ec4ebe 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -136,14 +136,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver ms.Close(); m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); - // Write out scene object metadata foreach (SceneObjectGroup sceneObject in m_sceneObjects) { //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); - string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, m_options); + string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, m_options); m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject); } diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 0699407..f2d487e 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// The maximum major version of OAR that we can write. /// - public static int MAX_MAJOR_VERSION = 1; + public static int MAX_MAJOR_VERSION = 0; protected Scene m_scene; protected Stream m_saveStream; @@ -206,37 +206,37 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// public static string CreateControlFile(Dictionary options) { - int majorVersion = MAX_MAJOR_VERSION, minorVersion = 0; - - if (options.ContainsKey("version")) - { - string[] parts = options["version"].ToString().Split('.'); - if (parts.Length >= 1) - { - majorVersion = Int32.Parse(parts[0]); - - if (parts.Length >= 2) - minorVersion = Int32.Parse(parts[1]); - } - } - - if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION) - { - throw new Exception( - string.Format( - "OAR version number for save must be between {0} and {1}", - MIN_MAJOR_VERSION, MAX_MAJOR_VERSION)); - } - else if (majorVersion == MAX_MAJOR_VERSION) - { - // Force 1.0 - minorVersion = 0; - } - else if (majorVersion == MIN_MAJOR_VERSION) - { - // Force 0.4 - minorVersion = 4; - } + int majorVersion = MAX_MAJOR_VERSION, minorVersion = 5; +// +// if (options.ContainsKey("version")) +// { +// string[] parts = options["version"].ToString().Split('.'); +// if (parts.Length >= 1) +// { +// majorVersion = Int32.Parse(parts[0]); +// +// if (parts.Length >= 2) +// minorVersion = Int32.Parse(parts[1]); +// } +// } +// +// if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION) +// { +// throw new Exception( +// string.Format( +// "OAR version number for save must be between {0} and {1}", +// MIN_MAJOR_VERSION, MAX_MAJOR_VERSION)); +// } +// else if (majorVersion == MAX_MAJOR_VERSION) +// { +// // Force 1.0 +// minorVersion = 0; +// } +// else if (majorVersion == MIN_MAJOR_VERSION) +// { +// // Force 0.4 +// minorVersion = 4; +// } m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); //if (majorVersion == 1) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 2d7244e..9277c59 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -125,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver Dictionary options = new Dictionary(); OptionSet ops = new OptionSet(); - ops.Add("v|version=", delegate(string v) { options["version"] = v; }); +// ops.Add("v|version=", delegate(string v) { options["version"] = v; }); ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); List mainParams = ops.Parse(cmdparams); -- cgit v1.1