* Added experimental "svn load <revision>" command to allow you to load a region from a specified SVN revision. Potentially useful for rollbacks.

0.6.0-stable
Adam Frisby 2008-04-20 04:15:12 +00:00
parent 1ca94ab5dd
commit 7d18a93c2e
1 changed files with 38 additions and 7 deletions

View File

@ -149,22 +149,53 @@ namespace OpenSim.Region.Modules.SvnSerialiser
{ {
if (args[0] == "svn" && args[1] == "save") if (args[0] == "svn" && args[1] == "save")
{ {
foreach (Scene scene in m_scenes) SaveAllScenes();
}
if (args.Length == 2)
{
if (args[0] == "svn" && args[1] == "load")
{ {
SaveRegion(scene); LoadAllScenes();
} }
} }
if (args[0] == "svn" && args[1] == "load") if (args.Length == 3)
{ {
CheckoutSvn(); if (args[0] == "svn" && args[1] == "load")
foreach (Scene scene in m_scenes)
{ {
LoadRegion(scene); LoadAllScenes(Int32.Parse(args[2]));
} }
} }
} }
private void LoadAllScenes()
{
CheckoutSvn();
foreach (Scene scene in m_scenes)
{
LoadRegion(scene);
}
}
private void LoadAllScenes(int revision)
{
CheckoutSvn(new SvnRevision(revision));
foreach (Scene scene in m_scenes)
{
LoadRegion(scene);
}
}
private void SaveAllScenes()
{
foreach (Scene scene in m_scenes)
{
SaveRegion(scene);
}
}
public void PostInitialise() public void PostInitialise()
{ {
if (m_enabled == false) if (m_enabled == false)