diff options
author | Justin Clark-Casey (justincc) | 2009-11-25 16:02:47 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-25 16:02:47 +0000 |
commit | c18422ad3a09cfabd86eb86403a77a6c720980f0 (patch) | |
tree | a9fafe364af92cbd4555defe0428d1e4966b4790 /OpenSim | |
parent | Add MIT/X11 licensed NDesk.Options (http://www.ndesk.org/Options) DLL to aid ... (diff) | |
download | opensim-SC-c18422ad3a09cfabd86eb86403a77a6c720980f0.zip opensim-SC-c18422ad3a09cfabd86eb86403a77a6c720980f0.tar.gz opensim-SC-c18422ad3a09cfabd86eb86403a77a6c720980f0.tar.bz2 opensim-SC-c18422ad3a09cfabd86eb86403a77a6c720980f0.tar.xz |
Implement oar merging
An oar can now be merged with existing region contents by using the --merge option
For example, load oar --merge my.oar
Existing terrain, region settings and parcel data is left in place when an oar is merged.
See http://opensimulator.org/wiki/OpenSim_Archives#Usage for more information
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 98fdec3..27763bb 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -93,19 +93,23 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
93 | /// <param name="cmdparams"></param> | 93 | /// <param name="cmdparams"></param> |
94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) | 94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) |
95 | { | 95 | { |
96 | OptionSet options = new OptionSet() {}; | 96 | bool mergeOar = false; |
97 | |||
98 | OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); | ||
97 | List<string> mainParams = options.Parse(cmdparams); | 99 | List<string> mainParams = options.Parse(cmdparams); |
98 | 100 | ||
99 | foreach (string param in mainParams) | 101 | // m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); |
100 | m_log.DebugFormat("Found param [{0}]", param); | 102 | // |
103 | // foreach (string param in mainParams) | ||
104 | // m_log.DebugFormat("GOT PARAM [{0}]", param); | ||
101 | 105 | ||
102 | if (mainParams.Count > 2) | 106 | if (mainParams.Count > 2) |
103 | { | 107 | { |
104 | DearchiveRegion(cmdparams[2]); | 108 | DearchiveRegion(mainParams[2], mergeOar, Guid.Empty); |
105 | } | 109 | } |
106 | else | 110 | else |
107 | { | 111 | { |
108 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); | 112 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, Guid.Empty); |
109 | } | 113 | } |
110 | } | 114 | } |
111 | 115 | ||