//
// $Id$
-#ifdef HAVE_CONFIG_H
-# include <simgear_config.h>
-#endif
-
+#include <simgear_config.h>
#include <simgear/compiler.h>
#ifdef HAVE_WINDOWS_H
#include <string>
#include <map>
-#include <simgear/compiler.h>
#include <simgear/version.h>
#include "terrasync.hxx"
#include <simgear/props/props_io.hxx>
#include <simgear/io/HTTPClient.hxx>
#include <simgear/io/SVNRepository.hxx>
+#include <simgear/io/HTTPRepository.hxx>
#include <simgear/structure/exception.hxx>
static const bool svn_built_in_available = true;
void setSvnServer(string server) { _svn_server = stripPath(server);}
void setSvnDataServer(string server) { _svn_data_server = stripPath(server);}
+ void setHTTPServer(const std::string& server)
+ {
+ _httpServer = stripPath(server);
+ }
void setExtSvnUtility(string svn_util) { _svn_command = simgear::strutils::strip(svn_util);}
void setRsyncServer(string server) { _rsync_server = simgear::strutils::strip(server);}
string _rsync_server;
string _local_dir;
SGPath _persistentCachePath;
+ string _httpServer;
};
SGTerraSync::SvnThread::SvnThread() :
} // of creating directory step
string serverUrl(_svn_server);
- if (slot.currentItem._type == SyncItem::AIData) {
- serverUrl = _svn_data_server;
+ if (!_httpServer.empty()) {
+ slot.repository.reset(new HTTPRepository(path, &_http));
+ serverUrl = _httpServer;
+ } else {
+ if (slot.currentItem._type == SyncItem::AIData) {
+ serverUrl = _svn_data_server;
+ }
+ slot.repository.reset(new SVNRepository(path, &_http));
}
- slot.repository.reset(new SVNRepository(path, &_http));
slot.repository->setBaseUrl(serverUrl + "/" + slot.currentItem._dir);
slot.repository->update();
if (_terraRoot->getBoolValue("enabled",false))
{
_svnThread->setSvnServer(_terraRoot->getStringValue("svn-server",""));
+ _svnThread->setHTTPServer(_terraRoot->getStringValue("http-server",""));
_svnThread->setSvnDataServer(_terraRoot->getStringValue("svn-data-server",""));
_svnThread->setRsyncServer(_terraRoot->getStringValue("rsync-server",""));
_svnThread->setLocalDir(_terraRoot->getStringValue("scenery-dir",""));