public static SVNRepository GetRepository(string url) { SVNRepository repo = null; var manager = new DatabaseManager(); var database = manager.GetDatabase(); var query = Query.EQ("Url", url); var collection = database.GetCollection <SVNRepository>(typeof(SVNRepository).Name); repo = collection.FindOne(query); return(repo); }
private void LoadConfiguration() { var config = (SVNConfiguration) ConfigurationManager.GetSection("SVN"); foreach (SVNConfiguration.Repository repo in config.Repos) { if (DBUtils.ReposExists(repo.Url)) { log.DebugFormat("Repository exists, getting in database : {0}", repo.Url); Repos.Add(DBUtils.GetRepository(repo.Url)); } else { log.DebugFormat("Repo {0} not exist, creating a new one", repo.Url); var repository = new SVNRepository(repo.Url); Repos.Add(repository); } } }
public bool RunDump(string profileName) { bool retval = false; DumpArgs args = GetDumpArgsFromProfileName(profileName); string configPath = Utilities.GetConfigFilePath(); if (File.Exists(configPath)) { _serverConfiguration = new SVNServerConfig(configPath); _controller = new SVNController(_serverConfiguration); SVNRepository repo = _controller.RepositoryCollection[args.RepositoryName]; retval = repo.DumpRepository(args); } return(retval); }