aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Modules')
-rw-r--r--OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs63
-rw-r--r--OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs4
-rw-r--r--OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs1
-rw-r--r--OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs1
-rw-r--r--OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs35
5 files changed, 52 insertions, 52 deletions
diff --git a/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs b/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs
index d6ef1fb..2d9f32f 100644
--- a/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs
+++ b/OpenSim/Region/Modules/AvatarFactory/AppearanceTableMapper.cs
@@ -26,11 +26,10 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using libsecondlife;
30using System.Text;
31using OpenSim.Region.Environment.Scenes;
32using OpenSim.Framework;
33using OpenSim.Data.Base; 30using OpenSim.Data.Base;
31using OpenSim.Framework;
32using OpenSim.Region.Environment.Scenes;
34 33
35namespace OpenSim.Region.Modules.AvatarFactory 34namespace OpenSim.Region.Modules.AvatarFactory
36{ 35{
@@ -52,7 +51,7 @@ namespace OpenSim.Region.Modules.AvatarFactory
52 51
53 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID", 52 m_keyFieldMapper = rowMapperSchema.AddMapping<Guid>("UUID",
54 delegate(AppearanceRowMapper mapper) { return mapper.Object.ScenePresenceID.UUID; }, 53 delegate(AppearanceRowMapper mapper) { return mapper.Object.ScenePresenceID.UUID; },
55 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.ScenePresenceID = new libsecondlife.LLUUID(value.ToString()); }); 54 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.ScenePresenceID = new LLUUID(value.ToString()); });
56 55
57 rowMapperSchema.AddMapping<uint>("Serial", 56 rowMapperSchema.AddMapping<uint>("Serial",
58 delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.WearablesSerial; }, 57 delegate(AppearanceRowMapper mapper) { return (uint)mapper.Object.WearablesSerial; },
@@ -64,127 +63,127 @@ namespace OpenSim.Region.Modules.AvatarFactory
64 { 63 {
65 if (mapper.Object.Wearables == null) 64 if (mapper.Object.Wearables == null)
66 { 65 {
67 mapper.Object.Wearables = new OpenSim.Framework.AvatarWearable[13]; 66 mapper.Object.Wearables = new AvatarWearable[13];
68 for (int i = 0; i < 13; i++) 67 for (int i = 0; i < 13; i++)
69 { 68 {
70 mapper.Object.Wearables[i] = new AvatarWearable(); 69 mapper.Object.Wearables[i] = new AvatarWearable();
71 } 70 }
72 } 71 }
73 mapper.Object.Wearables[0].ItemID = new libsecondlife.LLUUID(value.ToString()); 72 mapper.Object.Wearables[0].ItemID = new LLUUID(value.ToString());
74 }); 73 });
75 74
76 rowMapperSchema.AddMapping<Guid>("WearableAsset0", 75 rowMapperSchema.AddMapping<Guid>("WearableAsset0",
77 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.UUID; }, 76 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[0].AssetID.UUID; },
78 delegate(AppearanceRowMapper mapper, Guid value) 77 delegate(AppearanceRowMapper mapper, Guid value)
79 { mapper.Object.Wearables[0].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 78 { mapper.Object.Wearables[0].AssetID = new LLUUID(value.ToString()); });
80 79
81 rowMapperSchema.AddMapping<Guid>("WearableItem1", 80 rowMapperSchema.AddMapping<Guid>("WearableItem1",
82 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.UUID; }, 81 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].ItemID.UUID; },
83 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 82 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[1].ItemID = new LLUUID(value.ToString()); });
84 83
85 rowMapperSchema.AddMapping<Guid>("WearableAsset1", 84 rowMapperSchema.AddMapping<Guid>("WearableAsset1",
86 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.UUID; }, 85 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[1].AssetID.UUID; },
87 delegate(AppearanceRowMapper mapper, Guid value) 86 delegate(AppearanceRowMapper mapper, Guid value)
88 { mapper.Object.Wearables[1].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 87 { mapper.Object.Wearables[1].AssetID = new LLUUID(value.ToString()); });
89 88
90 rowMapperSchema.AddMapping<Guid>("WearableItem2", 89 rowMapperSchema.AddMapping<Guid>("WearableItem2",
91 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.UUID; }, 90 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].ItemID.UUID; },
92 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 91 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[2].ItemID = new LLUUID(value.ToString()); });
93 92
94 rowMapperSchema.AddMapping<Guid>("WearableAsset2", 93 rowMapperSchema.AddMapping<Guid>("WearableAsset2",
95 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.UUID; }, 94 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[2].AssetID.UUID; },
96 delegate(AppearanceRowMapper mapper, Guid value) 95 delegate(AppearanceRowMapper mapper, Guid value)
97 { mapper.Object.Wearables[2].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 96 { mapper.Object.Wearables[2].AssetID = new LLUUID(value.ToString()); });
98 97
99 rowMapperSchema.AddMapping<Guid>("WearableItem3", 98 rowMapperSchema.AddMapping<Guid>("WearableItem3",
100 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.UUID; }, 99 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].ItemID.UUID; },
101 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 100 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[3].ItemID = new LLUUID(value.ToString()); });
102 101
103 rowMapperSchema.AddMapping<Guid>("WearableAsset3", 102 rowMapperSchema.AddMapping<Guid>("WearableAsset3",
104 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.UUID; }, 103 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[3].AssetID.UUID; },
105 delegate(AppearanceRowMapper mapper, Guid value) 104 delegate(AppearanceRowMapper mapper, Guid value)
106 { mapper.Object.Wearables[3].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 105 { mapper.Object.Wearables[3].AssetID = new LLUUID(value.ToString()); });
107 106
108 rowMapperSchema.AddMapping<Guid>("WearableItem4", 107 rowMapperSchema.AddMapping<Guid>("WearableItem4",
109 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.UUID; }, 108 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].ItemID.UUID; },
110 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 109 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[4].ItemID = new LLUUID(value.ToString()); });
111 110
112 rowMapperSchema.AddMapping<Guid>("WearableAsset4", 111 rowMapperSchema.AddMapping<Guid>("WearableAsset4",
113 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.UUID; }, 112 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[4].AssetID.UUID; },
114 delegate(AppearanceRowMapper mapper, Guid value) 113 delegate(AppearanceRowMapper mapper, Guid value)
115 { mapper.Object.Wearables[4].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 114 { mapper.Object.Wearables[4].AssetID = new LLUUID(value.ToString()); });
116 115
117 rowMapperSchema.AddMapping<Guid>("WearableItem5", 116 rowMapperSchema.AddMapping<Guid>("WearableItem5",
118 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.UUID; }, 117 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].ItemID.UUID; },
119 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 118 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[5].ItemID = new LLUUID(value.ToString()); });
120 119
121 rowMapperSchema.AddMapping<Guid>("WearableAsset5", 120 rowMapperSchema.AddMapping<Guid>("WearableAsset5",
122 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.UUID; }, 121 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[5].AssetID.UUID; },
123 delegate(AppearanceRowMapper mapper, Guid value) 122 delegate(AppearanceRowMapper mapper, Guid value)
124 { mapper.Object.Wearables[5].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 123 { mapper.Object.Wearables[5].AssetID = new LLUUID(value.ToString()); });
125 124
126 rowMapperSchema.AddMapping<Guid>("WearableItem6", 125 rowMapperSchema.AddMapping<Guid>("WearableItem6",
127 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.UUID; }, 126 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].ItemID.UUID; },
128 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 127 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[6].ItemID = new LLUUID(value.ToString()); });
129 128
130 rowMapperSchema.AddMapping<Guid>("WearableAsset6", 129 rowMapperSchema.AddMapping<Guid>("WearableAsset6",
131 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.UUID; }, 130 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[6].AssetID.UUID; },
132 delegate(AppearanceRowMapper mapper, Guid value) 131 delegate(AppearanceRowMapper mapper, Guid value)
133 { mapper.Object.Wearables[6].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 132 { mapper.Object.Wearables[6].AssetID = new LLUUID(value.ToString()); });
134 133
135 rowMapperSchema.AddMapping<Guid>("WearableItem7", 134 rowMapperSchema.AddMapping<Guid>("WearableItem7",
136 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.UUID; }, 135 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].ItemID.UUID; },
137 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 136 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[7].ItemID = new LLUUID(value.ToString()); });
138 137
139 rowMapperSchema.AddMapping<Guid>("WearableAsset7", 138 rowMapperSchema.AddMapping<Guid>("WearableAsset7",
140 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.UUID; }, 139 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[7].AssetID.UUID; },
141 delegate(AppearanceRowMapper mapper, Guid value) 140 delegate(AppearanceRowMapper mapper, Guid value)
142 { mapper.Object.Wearables[7].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 141 { mapper.Object.Wearables[7].AssetID = new LLUUID(value.ToString()); });
143 142
144 rowMapperSchema.AddMapping<Guid>("WearableItem8", 143 rowMapperSchema.AddMapping<Guid>("WearableItem8",
145 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.UUID; }, 144 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].ItemID.UUID; },
146 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 145 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[8].ItemID = new LLUUID(value.ToString()); });
147 146
148 rowMapperSchema.AddMapping<Guid>("WearableAsset8", 147 rowMapperSchema.AddMapping<Guid>("WearableAsset8",
149 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.UUID; }, 148 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[8].AssetID.UUID; },
150 delegate(AppearanceRowMapper mapper, Guid value) 149 delegate(AppearanceRowMapper mapper, Guid value)
151 { mapper.Object.Wearables[8].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 150 { mapper.Object.Wearables[8].AssetID = new LLUUID(value.ToString()); });
152 151
153 rowMapperSchema.AddMapping<Guid>("WearableItem9", 152 rowMapperSchema.AddMapping<Guid>("WearableItem9",
154 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.UUID; }, 153 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].ItemID.UUID; },
155 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 154 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[9].ItemID = new LLUUID(value.ToString()); });
156 155
157 rowMapperSchema.AddMapping<Guid>("WearableAsset9", 156 rowMapperSchema.AddMapping<Guid>("WearableAsset9",
158 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.UUID; }, 157 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[9].AssetID.UUID; },
159 delegate(AppearanceRowMapper mapper, Guid value) 158 delegate(AppearanceRowMapper mapper, Guid value)
160 { mapper.Object.Wearables[9].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 159 { mapper.Object.Wearables[9].AssetID = new LLUUID(value.ToString()); });
161 160
162 rowMapperSchema.AddMapping<Guid>("WearableItem10", 161 rowMapperSchema.AddMapping<Guid>("WearableItem10",
163 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.UUID; }, 162 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].ItemID.UUID; },
164 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 163 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[10].ItemID = new LLUUID(value.ToString()); });
165 164
166 rowMapperSchema.AddMapping<Guid>("WearableAsset10", 165 rowMapperSchema.AddMapping<Guid>("WearableAsset10",
167 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.UUID; }, 166 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[10].AssetID.UUID; },
168 delegate(AppearanceRowMapper mapper, Guid value) 167 delegate(AppearanceRowMapper mapper, Guid value)
169 { mapper.Object.Wearables[10].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 168 { mapper.Object.Wearables[10].AssetID = new LLUUID(value.ToString()); });
170 169
171 rowMapperSchema.AddMapping<Guid>("WearableItem11", 170 rowMapperSchema.AddMapping<Guid>("WearableItem11",
172 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.UUID; }, 171 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].ItemID.UUID; },
173 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 172 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[11].ItemID = new LLUUID(value.ToString()); });
174 173
175 rowMapperSchema.AddMapping<Guid>("WearableAsset11", 174 rowMapperSchema.AddMapping<Guid>("WearableAsset11",
176 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.UUID; }, 175 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[11].AssetID.UUID; },
177 delegate(AppearanceRowMapper mapper, Guid value) 176 delegate(AppearanceRowMapper mapper, Guid value)
178 { mapper.Object.Wearables[11].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 177 { mapper.Object.Wearables[11].AssetID = new LLUUID(value.ToString()); });
179 178
180 rowMapperSchema.AddMapping<Guid>("WearableItem12", 179 rowMapperSchema.AddMapping<Guid>("WearableItem12",
181 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.UUID; }, 180 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].ItemID.UUID; },
182 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new libsecondlife.LLUUID(value.ToString()); }); 181 delegate(AppearanceRowMapper mapper, Guid value) { mapper.Object.Wearables[12].ItemID = new LLUUID(value.ToString()); });
183 182
184 rowMapperSchema.AddMapping<Guid>("WearableAsset12", 183 rowMapperSchema.AddMapping<Guid>("WearableAsset12",
185 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.UUID; }, 184 delegate(AppearanceRowMapper mapper) { return mapper.Object.Wearables[12].AssetID.UUID; },
186 delegate(AppearanceRowMapper mapper, Guid value) 185 delegate(AppearanceRowMapper mapper, Guid value)
187 { mapper.Object.Wearables[12].AssetID = new libsecondlife.LLUUID(value.ToString()); }); 186 { mapper.Object.Wearables[12].AssetID = new LLUUID(value.ToString()); });
188 187
189 } 188 }
190 189
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
index ae522ef..0ee8848 100644
--- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
@@ -30,12 +30,12 @@ using System.Collections.Generic;
30using System.Threading; 30using System.Threading;
31using libsecondlife; 31using libsecondlife;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Data.Base;
34using OpenSim.Data.MapperFactory;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache; 36using OpenSim.Framework.Communications.Cache;
35using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
36using OpenSim.Region.Environment.Scenes; 38using OpenSim.Region.Environment.Scenes;
37using OpenSim.Data.Base;
38using OpenSim.Data.MapperFactory;
39 39
40namespace OpenSim.Region.Modules.AvatarFactory 40namespace OpenSim.Region.Modules.AvatarFactory
41{ 41{
diff --git a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs
index ec9714a..a9fe53e 100644
--- a/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Modules/AvatarFactory/Properties/AssemblyInfo.cs
@@ -26,7 +26,6 @@
26 */ 26 */
27 27
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
31 30
32// General Information about an assembly is controlled through the following 31// General Information about an assembly is controlled through the following
diff --git a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs b/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs
index e50a89e..c9f8423 100644
--- a/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/Modules/SvnSerialiser/Properties/AssemblyInfo.cs
@@ -26,7 +26,6 @@
26 */ 26 */
27 27
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.CompilerServices;
30using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
31 30
32// General Information about an assembly is controlled through the following 31// General Information about an assembly is controlled through the following
diff --git a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs
index aaa7acf..4046a7c 100644
--- a/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs
+++ b/OpenSim/Region/Modules/SvnSerialiser/SvnBackupModule.cs
@@ -1,20 +1,23 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.IO;
4using System.Reflection;
5using System.Timers;
6using log4net;
3using Nini.Config; 7using Nini.Config;
4using OpenSim.Region.Environment.Interfaces; 8using OpenSim.Region.Environment.Interfaces;
5using OpenSim.Region.Environment.Scenes;
6using OpenSim.Region.Environment.Modules.ExportSerialiser; 9using OpenSim.Region.Environment.Modules.ExportSerialiser;
7 10using OpenSim.Region.Environment.Modules.Terrain;
8using PumaCode.SvnDotNet.SubversionSharp; 11using OpenSim.Region.Environment.Scenes;
9using PumaCode.SvnDotNet.AprSharp; 12using PumaCode.SvnDotNet.AprSharp;
10 13using PumaCode.SvnDotNet.SubversionSharp;
11using Slash=System.IO.Path; 14using Slash=System.IO.Path;
12 15
13namespace OpenSim.Region.Modules.SvnSerialiser 16namespace OpenSim.Region.Modules.SvnSerialiser
14{ 17{
15 public class SvnBackupModule : IRegionModule 18 public class SvnBackupModule : IRegionModule
16 { 19 {
17 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 20 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
18 21
19 private SvnClient m_svnClient; 22 private SvnClient m_svnClient;
20 private bool m_enabled = false; 23 private bool m_enabled = false;
@@ -26,7 +29,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
26 29
27 private TimeSpan m_svnperiod = new TimeSpan(0, 0, 15, 0, 0); 30 private TimeSpan m_svnperiod = new TimeSpan(0, 0, 15, 0, 0);
28 private bool m_svnAutoSave = false; 31 private bool m_svnAutoSave = false;
29 private System.Timers.Timer m_timer = new System.Timers.Timer(); 32 private Timer m_timer = new Timer();
30 33
31 private IRegionSerialiser m_serialiser; 34 private IRegionSerialiser m_serialiser;
32 private List<Scene> m_scenes = new List<Scene>(); 35 private List<Scene> m_scenes = new List<Scene>();
@@ -87,7 +90,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
87 { 90 {
88 scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + 91 scene.LoadPrimsFromXml2(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() +
89 Slash.DirectorySeparatorChar + "objects.xml"); 92 Slash.DirectorySeparatorChar + "objects.xml");
90 scene.RequestModuleInterface<OpenSim.Region.Environment.Modules.Terrain.ITerrainModule>().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() + 93 scene.RequestModuleInterface<ITerrainModule>().LoadFromFile(m_svndir + Slash.DirectorySeparatorChar + scene.RegionInfo.RegionID.ToString() +
91 Slash.DirectorySeparatorChar + "heightmap.r32"); 94 Slash.DirectorySeparatorChar + "heightmap.r32");
92 m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ")."); 95 m_log.Info("[SVNBACKUP]: Region load successful (" + scene.RegionInfo.RegionName + ").");
93 } 96 }
@@ -104,16 +107,16 @@ namespace OpenSim.Region.Modules.SvnSerialiser
104 107
105 private void CheckoutSvnPartial(string subdir) 108 private void CheckoutSvnPartial(string subdir)
106 { 109 {
107 if (!System.IO.Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) 110 if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir))
108 System.IO.Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); 111 Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir);
109 112
110 m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false); 113 m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, Svn.Revision.Head, Svn.Revision.Head, true, false);
111 } 114 }
112 115
113 private void CheckoutSvnPartial(string subdir, SvnRevision revision) 116 private void CheckoutSvnPartial(string subdir, SvnRevision revision)
114 { 117 {
115 if (!System.IO.Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir)) 118 if (!Directory.Exists(m_svndir + Slash.DirectorySeparatorChar + subdir))
116 System.IO.Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir); 119 Directory.CreateDirectory(m_svndir + Slash.DirectorySeparatorChar + subdir);
117 120
118 m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, revision, revision, true, false); 121 m_svnClient.Checkout2(m_svnurl + "/" + subdir, m_svndir, revision, revision, true, false);
119 } 122 }
@@ -138,7 +141,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
138 { 141 {
139 foreach (SvnClientCommitItem2 item in commitItems) 142 foreach (SvnClientCommitItem2 item in commitItems)
140 { 143 {
141 m_log.Debug("[SVNBACKUP]: ... " + System.IO.Path.GetFileName(item.Path.ToString()) + " (" + item.Kind.ToString() + ") r" + item.Revision.ToString()); 144 m_log.Debug("[SVNBACKUP]: ... " + Path.GetFileName(item.Path.ToString()) + " (" + item.Kind.ToString() + ") r" + item.Revision.ToString());
142 } 145 }
143 } 146 }
144 147
@@ -277,7 +280,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
277 if (m_svnAutoSave == true) 280 if (m_svnAutoSave == true)
278 { 281 {
279 m_timer.Interval = m_svnperiod.TotalMilliseconds; 282 m_timer.Interval = m_svnperiod.TotalMilliseconds;
280 m_timer.Elapsed += new System.Timers.ElapsedEventHandler(m_timer_Elapsed); 283 m_timer.Elapsed += new ElapsedEventHandler(m_timer_Elapsed);
281 m_timer.AutoReset = true; 284 m_timer.AutoReset = true;
282 m_timer.Start(); 285 m_timer.Start();
283 } 286 }
@@ -300,7 +303,7 @@ namespace OpenSim.Region.Modules.SvnSerialiser
300 } 303 }
301 } 304 }
302 305
303 void m_timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) 306 void m_timer_Elapsed(object sender, ElapsedEventArgs e)
304 { 307 {
305 SaveAllRegions(); 308 SaveAllRegions();
306 } 309 }
@@ -322,8 +325,8 @@ namespace OpenSim.Region.Modules.SvnSerialiser
322 325
323 private void CreateSvnDirectory() 326 private void CreateSvnDirectory()
324 { 327 {
325 if (!System.IO.Directory.Exists(m_svndir)) 328 if (!Directory.Exists(m_svndir))
326 System.IO.Directory.CreateDirectory(m_svndir); 329 Directory.CreateDirectory(m_svndir);
327 } 330 }
328 331
329 public void Close() 332 public void Close()