public SparkleRepo(string path, SparkleConfig config) : base(path, config) { SparkleGit git = new SparkleGit(LocalPath, "config core.ignorecase false"); git.StartAndWaitForExit(); // Check if we should use git-bin git = new SparkleGit(LocalPath, "config --get filter.bin.clean"); git.StartAndWaitForExit(); this.use_git_bin = (git.ExitCode == 0); if (this.use_git_bin) { ConfigureGitBin(); } git = new SparkleGit(LocalPath, "config remote.origin.url \"" + RemoteUrl + "\""); git.StartAndWaitForExit(); string password_file_path = Path.Combine(LocalPath, ".git", "password"); if (File.Exists(password_file_path)) { this.is_encrypted = true; } }
public SparkleControllerBase() { string app_data_path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string config_path = Path.Combine(app_data_path, "sparkleshare"); Config = new SparkleConfig(config_path, "config.xml"); SparkleConfig.DefaultConfig = Config; FoldersPath = Config.FoldersPath; }
public SparkleRepo(string path, SparkleConfig config) : base(path, config) { SparkleGit git = new SparkleGit(LocalPath, "config --get filter.bin.clean"); git.Start(); git.WaitForExit(); this.use_git_bin = (git.ExitCode == 0); string rebase_apply_path = new string [] { LocalPath, ".git", "rebase-apply" }.Combine(); if (Directory.Exists(rebase_apply_path)) { git = new SparkleGit(LocalPath, "rebase --abort"); git.StartAndWaitForExit(); } }
public Cmis(string path, SparkleConfig config) { databaseFilename = path + ".s3db"; // Set local root folder. //string localPath = config.GetFolderOptionalAttribute(Path.GetFileName(path), "name"); localRootFolder = path; //Path.Combine(SparkleFolder.ROOT_FOLDER, localPath); // Get path on remote repository. remoteFolderPath = config.GetFolderOptionalAttribute(Path.GetFileName(path), "remoteFolder"); cmisParameters = new Dictionary<string, string>(); cmisParameters[SessionParameter.BindingType] = BindingType.AtomPub; cmisParameters[SessionParameter.AtomPubUrl] = config.GetUrlForFolder(Path.GetFileName(path)); cmisParameters[SessionParameter.User] = config.GetFolderOptionalAttribute(Path.GetFileName(path), "user"); cmisParameters[SessionParameter.Password] = config.GetFolderOptionalAttribute(Path.GetFileName(path), "password"); cmisParameters[SessionParameter.RepositoryId] = config.GetFolderOptionalAttribute(Path.GetFileName(path), "repository"); syncing = false; }
public SparkleRepo(string path, SparkleConfig config) : base(path, config) { // TODO: Set git locale to en-US SparkleGit git = new SparkleGit(LocalPath, "config --get filter.bin.clean"); git.StartAndWaitForExit(); this.use_git_bin = (git.ExitCode == 0); git = new SparkleGit(LocalPath, "config remote.origin.url \"" + RemoteUrl + "\""); git.StartAndWaitForExit(); string rebase_apply_path = new string [] { LocalPath, ".git", "rebase-apply" }.Combine(); if (Directory.Exists(rebase_apply_path)) { git = new SparkleGit(LocalPath, "rebase --abort"); git.StartAndWaitForExit(); } }
/** * Constructor for SparkleRepo (at every launch of CmisSync) */ public CmisDirectory(string localPath, SparkleConfig config, ActivityListener activityListener) { this.activityListener = activityListener; // Set local root folder. this.localRootFolder = Path.Combine(SparkleFolder.ROOT_FOLDER, localPath); database = new CmisDatabase(localRootFolder); // Get path on remote repository. remoteFolderPath = config.GetFolderOptionalAttribute(Path.GetFileName(localRootFolder), "remoteFolder"); cmisParameters = new Dictionary<string, string>(); cmisParameters[SessionParameter.BindingType] = BindingType.AtomPub; cmisParameters[SessionParameter.AtomPubUrl] = config.GetUrlForFolder(Path.GetFileName(localRootFolder)); cmisParameters[SessionParameter.User] = config.GetFolderOptionalAttribute(Path.GetFileName(localRootFolder), "user"); cmisParameters[SessionParameter.Password] = config.GetFolderOptionalAttribute(Path.GetFileName(localRootFolder), "password"); cmisParameters[SessionParameter.RepositoryId] = config.GetFolderOptionalAttribute(Path.GetFileName(localRootFolder), "repository"); syncing = false; }