diff options
author | Justin Clark-Casey (justincc) | 2010-04-16 22:29:11 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-16 22:29:11 +0100 |
commit | bf3956aeb0a44d0dd455e330234fcf0e18f5ea43 (patch) | |
tree | ef98a5c369f1359ee1ebcfd9e90ad945039c9c17 /OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |
parent | add a missing initialization of the m_memoryCache in XmlRpcGroupsServicesConn... (diff) | |
download | opensim-SC_OLD-bf3956aeb0a44d0dd455e330234fcf0e18f5ea43.zip opensim-SC_OLD-bf3956aeb0a44d0dd455e330234fcf0e18f5ea43.tar.gz opensim-SC_OLD-bf3956aeb0a44d0dd455e330234fcf0e18f5ea43.tar.bz2 opensim-SC_OLD-bf3956aeb0a44d0dd455e330234fcf0e18f5ea43.tar.xz |
Add --skip-assets option to load oar.
This allows you to load an oar without loading its assets. This is useful if you know that the required assets are already in the asset service, since loading without assets is quicker.
This option will become more useful when the ability to save oars without assets is added, which should happen fairly soon. At this point there will also be better documentation.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index fc8d4e1..82ede01 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -94,8 +94,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) | 94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) |
95 | { | 95 | { |
96 | bool mergeOar = false; | 96 | bool mergeOar = false; |
97 | bool skipAssets = false; | ||
97 | 98 | ||
98 | OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); | 99 | OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); |
100 | options.Add("s|skip-assets", delegate (string v) { skipAssets = v != null; }); | ||
101 | |||
99 | List<string> mainParams = options.Parse(cmdparams); | 102 | List<string> mainParams = options.Parse(cmdparams); |
100 | 103 | ||
101 | // m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); | 104 | // m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); |
@@ -105,11 +108,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
105 | 108 | ||
106 | if (mainParams.Count > 2) | 109 | if (mainParams.Count > 2) |
107 | { | 110 | { |
108 | DearchiveRegion(mainParams[2], mergeOar, Guid.Empty); | 111 | DearchiveRegion(mainParams[2], mergeOar, skipAssets, Guid.Empty); |
109 | } | 112 | } |
110 | else | 113 | else |
111 | { | 114 | { |
112 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, Guid.Empty); | 115 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, skipAssets, Guid.Empty); |
113 | } | 116 | } |
114 | } | 117 | } |
115 | 118 | ||
@@ -154,25 +157,25 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
154 | 157 | ||
155 | public void DearchiveRegion(string loadPath) | 158 | public void DearchiveRegion(string loadPath) |
156 | { | 159 | { |
157 | DearchiveRegion(loadPath, false, Guid.Empty); | 160 | DearchiveRegion(loadPath, false, false, Guid.Empty); |
158 | } | 161 | } |
159 | 162 | ||
160 | public void DearchiveRegion(string loadPath, bool merge, Guid requestId) | 163 | public void DearchiveRegion(string loadPath, bool merge, bool skipAssets, Guid requestId) |
161 | { | 164 | { |
162 | m_log.InfoFormat( | 165 | m_log.InfoFormat( |
163 | "[ARCHIVER]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); | 166 | "[ARCHIVER]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); |
164 | 167 | ||
165 | new ArchiveReadRequest(m_scene, loadPath, merge, requestId).DearchiveRegion(); | 168 | new ArchiveReadRequest(m_scene, loadPath, merge, skipAssets, requestId).DearchiveRegion(); |
166 | } | 169 | } |
167 | 170 | ||
168 | public void DearchiveRegion(Stream loadStream) | 171 | public void DearchiveRegion(Stream loadStream) |
169 | { | 172 | { |
170 | DearchiveRegion(loadStream, false, Guid.Empty); | 173 | DearchiveRegion(loadStream, false, false, Guid.Empty); |
171 | } | 174 | } |
172 | 175 | ||
173 | public void DearchiveRegion(Stream loadStream, bool merge, Guid requestId) | 176 | public void DearchiveRegion(Stream loadStream, bool merge, bool skipAssets, Guid requestId) |
174 | { | 177 | { |
175 | new ArchiveReadRequest(m_scene, loadStream, merge, requestId).DearchiveRegion(); | 178 | new ArchiveReadRequest(m_scene, loadStream, merge, skipAssets, requestId).DearchiveRegion(); |
176 | } | 179 | } |
177 | } | 180 | } |
178 | } | 181 | } |