aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2008-04-17 14:26:19 +0000
committerAdam Frisby2008-04-17 14:26:19 +0000
commitdb9c919086d96fac33b49860038aac11d17da7aa (patch)
treeeec788d212799443fad93e12b5907fe5fab7c620
parent* Added ITerrainModule interface to Terrain Module, and registered accordingl... (diff)
downloadopensim-SC-db9c919086d96fac33b49860038aac11d17da7aa.zip
opensim-SC-db9c919086d96fac33b49860038aac11d17da7aa.tar.gz
opensim-SC-db9c919086d96fac33b49860038aac11d17da7aa.tar.bz2
opensim-SC-db9c919086d96fac33b49860038aac11d17da7aa.tar.xz
* Added "svn load" command to correspond "svn save". Will grab the latest revision.
* TODO: Specific revision support.
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/ITerrainModule.cs2
-rw-r--r--OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs12
2 files changed, 13 insertions, 1 deletions
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 @@
1using System; 1using System;
2namespace OpenSim.Region.Environment.Modules.Terrain 2namespace OpenSim.Region.Environment.Modules.Terrain
3{ 3{
4 interface ITerrainModule 4 public interface ITerrainModule
5 { 5 {
6 void LoadFromFile(string filename); 6 void LoadFromFile(string filename);
7 void SaveToFile(string filename); 7 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
50 m_log.Info("[SVNBACKUP]: Backup successful."); 50 m_log.Info("[SVNBACKUP]: Backup successful.");
51 } 51 }
52 52
53 public void LoadRegion(Scene scene)
54 {
55 m_svnClient.Checkout2(m_svnurl, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false);
56 scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() +
57 Slash.DirectorySeparatorChar + "objects.xml");
58 scene.RequestModuleInterface<OpenSim.Region.Environment.Modules.Terrain.ITerrainModule>().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() +
59 Slash.DirectorySeparatorChar + "heightmap.r32");
60 m_log.Info("[SVNBACKUP]: Load successful.");
61 }
62
53 #endregion 63 #endregion
54 64
55 #region SvnDotNet Callbacks 65 #region SvnDotNet Callbacks
@@ -114,6 +124,8 @@ namespace OpenSim.Region.Modules.SvnSerialiser
114 { 124 {
115 if (args[0] == "svn" && args[1] == "save") 125 if (args[0] == "svn" && args[1] == "save")
116 SaveRegion(m_scenes[0]); 126 SaveRegion(m_scenes[0]);
127 if (args[0] == "svn" && args[1] == "load")
128 LoadRegion(m_scenes[0]);
117 } 129 }
118 130
119 public void PostInitialise() 131 public void PostInitialise()