From b3e10debdd26fd80396ad50b4be23468b49d403d Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 20 Apr 2008 04:21:18 +0000 Subject: * Added support for new "svn load-region [svn revision]" command to SVN Backup Module. --- .../Modules/SvnSerialiser/SvnBackupModule.cs | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'OpenSim') 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 LoadAllScenes(Int32.Parse(args[2])); } } + if (args.Length == 3) + { + if (args[0] == "svn" && args[1] == "load-region") + { + LoadScene(args[2]); + } + } + if (args.Length == 4) + { + if (args[0] == "svn" && args[1] == "load-region") + { + LoadScene(args[2], Int32.Parse(args[3])); + } + } + } + + public void LoadScene(string name) + { + CheckoutSvn(); + + foreach (Scene scene in m_scenes) + { + if (scene.RegionInfo.RegionName.ToLower().Equals(name.ToLower())) + { + LoadRegion(scene); + return; + } + } + m_log.Warn("[SVNBACKUP]: No region loaded - unable to find matching name."); + } + + public void LoadScene(string name, int revision) + { + CheckoutSvn(new SvnRevision(revision)); + + foreach (Scene scene in m_scenes) + { + if (scene.RegionInfo.RegionName.ToLower().Equals(name.ToLower())) + { + LoadRegion(scene); + return; + } + } + m_log.Warn("[SVNBACKUP]: No region loaded - unable to find matching name."); } private void LoadAllScenes() -- cgit v1.1