public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager taskManager, IUsageTracker usageTracker, IGitClient gitClient, NPath repositoryRoot) { var repositoryPathConfiguration = new RepositoryPathConfiguration(repositoryRoot); string filePath = repositoryPathConfiguration.DotGitConfig; var gitConfig = new GitConfig(filePath); var repositoryWatcher = new RepositoryWatcher(platform, repositoryPathConfiguration, taskManager.Token); return(new RepositoryManager(platform, taskManager, usageTracker, gitConfig, repositoryWatcher, gitClient, repositoryPathConfiguration, taskManager.Token)); }
public RepositoryWatcher(IPlatform platform, RepositoryPathConfiguration paths, CancellationToken cancellationToken) { this.paths = paths; this.cancellationToken = cancellationToken; ignoredPaths = new[] { platform.Environment.UnityProjectPath.Combine("Library"), platform.Environment.UnityProjectPath.Combine("Temp") }; pauseEvent = new ManualResetEventSlim(); //disableNative = !platform.Environment.IsWindows; }
public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager taskManager, IGitClient gitClient, IProcessManager processManager, IFileSystem fileSystem, NPath repositoryRoot) { var repositoryPathConfiguration = new RepositoryPathConfiguration(repositoryRoot); string filePath = repositoryPathConfiguration.DotGitConfig; var gitConfig = new GitConfig(filePath); var repositoryWatcher = new RepositoryWatcher(platform, repositoryPathConfiguration, taskManager.Token); return(new RepositoryManager(gitConfig, repositoryWatcher, gitClient, processManager, fileSystem, taskManager.Token, repositoryPathConfiguration)); }
public void RestartRepository() { Environment.InitializeRepository(); if (Environment.RepositoryPath != null) { var repositoryPathConfiguration = new RepositoryPathConfiguration(Environment.RepositoryPath); var gitConfig = new GitConfig(repositoryPathConfiguration.DotGitConfig); var repositoryWatcher = new RepositoryWatcher(Platform, repositoryPathConfiguration, TaskManager.Token); repositoryManager = new RepositoryManager(Platform, TaskManager, UsageTracker, gitConfig, repositoryWatcher, GitClient, repositoryPathConfiguration, TaskManager.Token); Environment.Repository = repositoryManager.Repository; Logger.Trace($"Got a repository? {Environment.Repository}"); } }