diff options
Diffstat (limited to 'OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs')
-rw-r--r-- | OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | 12 |
1 files changed, 12 insertions, 0 deletions
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() |