diff options
author | Adam Frisby | 2008-04-20 04:15:12 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-20 04:15:12 +0000 |
commit | 7d18a93c2edfabe4348bb445739ef531bba12cea (patch) | |
tree | 3f38c93f2e223d695dbb91e371e2ea6c7e2fdcc1 | |
parent | * Fixed three compiler warnings introduced in the previous commit. (diff) | |
download | opensim-SC-7d18a93c2edfabe4348bb445739ef531bba12cea.zip opensim-SC-7d18a93c2edfabe4348bb445739ef531bba12cea.tar.gz opensim-SC-7d18a93c2edfabe4348bb445739ef531bba12cea.tar.bz2 opensim-SC-7d18a93c2edfabe4348bb445739ef531bba12cea.tar.xz |
* Added experimental "svn load <revision>" command to allow you to load a region from a specified SVN revision. Potentially useful for rollbacks.
-rw-r--r-- | OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index 0c1ee33..26f1fa3 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | |||
@@ -149,22 +149,53 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
149 | { | 149 | { |
150 | if (args[0] == "svn" && args[1] == "save") | 150 | if (args[0] == "svn" && args[1] == "save") |
151 | { | 151 | { |
152 | foreach (Scene scene in m_scenes) | 152 | SaveAllScenes(); |
153 | } | ||
154 | if (args.Length == 2) | ||
155 | { | ||
156 | if (args[0] == "svn" && args[1] == "load") | ||
153 | { | 157 | { |
154 | SaveRegion(scene); | 158 | LoadAllScenes(); |
155 | } | 159 | } |
156 | } | 160 | } |
157 | if (args[0] == "svn" && args[1] == "load") | 161 | if (args.Length == 3) |
158 | { | 162 | { |
159 | CheckoutSvn(); | 163 | if (args[0] == "svn" && args[1] == "load") |
160 | |||
161 | foreach (Scene scene in m_scenes) | ||
162 | { | 164 | { |
163 | LoadRegion(scene); | 165 | LoadAllScenes(Int32.Parse(args[2])); |
164 | } | 166 | } |
165 | } | 167 | } |
166 | } | 168 | } |
167 | 169 | ||
170 | private void LoadAllScenes() | ||
171 | { | ||
172 | CheckoutSvn(); | ||
173 | |||
174 | foreach (Scene scene in m_scenes) | ||
175 | { | ||
176 | LoadRegion(scene); | ||
177 | } | ||
178 | } | ||
179 | |||
180 | |||
181 | private void LoadAllScenes(int revision) | ||
182 | { | ||
183 | CheckoutSvn(new SvnRevision(revision)); | ||
184 | |||
185 | foreach (Scene scene in m_scenes) | ||
186 | { | ||
187 | LoadRegion(scene); | ||
188 | } | ||
189 | } | ||
190 | |||
191 | private void SaveAllScenes() | ||
192 | { | ||
193 | foreach (Scene scene in m_scenes) | ||
194 | { | ||
195 | SaveRegion(scene); | ||
196 | } | ||
197 | } | ||
198 | |||
168 | public void PostInitialise() | 199 | public void PostInitialise() |
169 | { | 200 | { |
170 | if (m_enabled == false) | 201 | if (m_enabled == false) |