From db9c919086d96fac33b49860038aac11d17da7aa Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 17 Apr 2008 14:26:19 +0000 Subject: * Added "svn load" command to correspond "svn save". Will grab the latest revision. * TODO: Specific revision support. --- OpenSim/Region/Environment/Modules/Terrain/ITerrainModule.cs | 2 +- OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Environment/Modules/Terrain/ITerrainModule.cs b/OpenSim/Region/Environment/Modules/Terrain/ITerrainModule.cs index 9e919b5..3d00b2d 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/ITerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/ITerrainModule.cs @@ -1,7 +1,7 @@ using System; namespace OpenSim.Region.Environment.Modules.Terrain { - interface ITerrainModule + public interface ITerrainModule { void LoadFromFile(string filename); void SaveToFile(string filename); diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index e12c1f1..c7e2fe0 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs @@ -50,6 +50,16 @@ namespace OpenSim.Region.Modules.SvnSerialiser m_log.Info("[SVNBACKUP]: Backup successful."); } + public void LoadRegion(Scene scene) + { + m_svnClient.Checkout2(m_svnurl, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false); + scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + + Slash.DirectorySeparatorChar + "objects.xml"); + scene.RequestModuleInterface().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + + Slash.DirectorySeparatorChar + "heightmap.r32"); + m_log.Info("[SVNBACKUP]: Load successful."); + } + #endregion #region SvnDotNet Callbacks @@ -114,6 +124,8 @@ namespace OpenSim.Region.Modules.SvnSerialiser { if (args[0] == "svn" && args[1] == "save") SaveRegion(m_scenes[0]); + if (args[0] == "svn" && args[1] == "load") + LoadRegion(m_scenes[0]); } public void PostInitialise() -- cgit v1.1