diff options
author | Adam Frisby | 2008-04-20 04:21:18 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-20 04:21:18 +0000 |
commit | b3e10debdd26fd80396ad50b4be23468b49d403d (patch) | |
tree | 2a5d4e5645c805f4239d50d3f08a6b1dd17c79cc /OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | |
parent | * Updates LSL2CS converter (diff) | |
download | opensim-SC_OLD-b3e10debdd26fd80396ad50b4be23468b49d403d.zip opensim-SC_OLD-b3e10debdd26fd80396ad50b4be23468b49d403d.tar.gz opensim-SC_OLD-b3e10debdd26fd80396ad50b4be23468b49d403d.tar.bz2 opensim-SC_OLD-b3e10debdd26fd80396ad50b4be23468b49d403d.tar.xz |
* Added support for new "svn load-region <region name> [svn revision]" command to SVN Backup Module.
Diffstat (limited to 'OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs')
-rw-r--r-- | OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs index 26f1fa3..022755b 100644 --- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs +++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs | |||
@@ -165,6 +165,50 @@ namespace OpenSim.Region.Modules.SvnSerialiser | |||
165 | LoadAllScenes(Int32.Parse(args[2])); | 165 | LoadAllScenes(Int32.Parse(args[2])); |
166 | } | 166 | } |
167 | } | 167 | } |
168 | if (args.Length == 3) | ||
169 | { | ||
170 | if (args[0] == "svn" && args[1] == "load-region") | ||
171 | { | ||
172 | LoadScene(args[2]); | ||
173 | } | ||
174 | } | ||
175 | if (args.Length == 4) | ||
176 | { | ||
177 | if (args[0] == "svn" && args[1] == "load-region") | ||
178 | { | ||
179 | LoadScene(args[2], Int32.Parse(args[3])); | ||
180 | } | ||
181 | } | ||
182 | } | ||
183 | |||
184 | public void LoadScene(string name) | ||
185 | { | ||
186 | CheckoutSvn(); | ||
187 | |||
188 | foreach (Scene scene in m_scenes) | ||
189 | { | ||
190 | if (scene.RegionInfo.RegionName.ToLower().Equals(name.ToLower())) | ||
191 | { | ||
192 | LoadRegion(scene); | ||
193 | return; | ||
194 | } | ||
195 | } | ||
196 | m_log.Warn("[SVNBACKUP]: No region loaded - unable to find matching name."); | ||
197 | } | ||
198 | |||
199 | public void LoadScene(string name, int revision) | ||
200 | { | ||
201 | CheckoutSvn(new SvnRevision(revision)); | ||
202 | |||
203 | foreach (Scene scene in m_scenes) | ||
204 | { | ||
205 | if (scene.RegionInfo.RegionName.ToLower().Equals(name.ToLower())) | ||
206 | { | ||
207 | LoadRegion(scene); | ||
208 | return; | ||
209 | } | ||
210 | } | ||
211 | m_log.Warn("[SVNBACKUP]: No region loaded - unable to find matching name."); | ||
168 | } | 212 | } |
169 | 213 | ||
170 | private void LoadAllScenes() | 214 | private void LoadAllScenes() |