public void Backup(ConfigSource source, IEnumerable <HosterRepository> repos) { this.logger.Log(ErrorLevel.Info, Resource.BackupMaker_Source, source.Title); string sourceFolder = this.fileHelper.CreateSubDirectory(context.Config.LocalFolder, source.Title); var url = new UrlHelper(); foreach (var repo in repos) { string repoFolder = this.fileHelper.CreateSubDirectory(sourceFolder, repo.FullName); this.logger.Log(ErrorLevel.Info, Resource.BackupMaker_Repo, repo.Scm.ToString(), url.RemoveCredentialsFromUrl(repo.CloneUrl)); this.backupMaker.MakeBackup(source, repo, repoFolder); } }
public List <HosterRepository> GetRepositoryList(ConfigSource source) { this.logger.Log(ErrorLevel.Info, Resource.ApiGettingRepos, source.Title, source.Hoster); var repos = this.caller.GetRepositoryList(source); // #40: Bitbucket will remove all Mercurial repos on Jun 01 2020 -> show warning when the list contains at least one if (source.Hoster == "bitbucket") { var hgrepos = repos.Where(r => r.Scm == ScmType.Mercurial).Count(); if (hgrepos > 0) { this.logger.Log(ErrorLevel.Warn, Resource.BitbucketMercurialWarning, hgrepos); } } return(repos); }
public IEnumerable <HosterRepository> GetReposForSource(ConfigSource config) { return(this.Dic[config].OrderBy(r => r.FullName)); }
public void AddItem(ConfigSource config, List <HosterRepository> repos) { this.Dic.Add(config, repos); }
public List <HosterRepository> GetRepositoryList(ConfigSource source) { this.logger.Log(ErrorLevel.Info, Resource.ApiGettingRepos, source.Title, source.Hoster); return(this.caller.GetRepositoryList(source)); }
public ValidationResult(ConfigSource configSource) { this.Messages = new List <ValidationMessage>(); this.source = configSource; }