Ejemplo n.º 1
0
        public static  SvnRevisionInfoEventArgs[] Run(string path, long revision = -1)
        {
            var revisionString = revision == -1 ? "head" : revision.ToString();

            var text = SvnClientHost.Run("list", "-R", "-r", revisionString, "--xml", path.WrapQuot());

            return(Parse(text));
        }
Ejemplo n.º 2
0
        public static   SvnLogEventArgs[] Run(string path, string arguments)
        {
            if (arguments.IndexOf("--xml") < 0)
            {
                arguments += " --xml";
            }
            var text = SvnClientHost.Run("log", path.WrapQuot(), arguments);

            return(SvnLogEventArgs.Read(text));
        }
Ejemplo n.º 3
0
        public void CancelTransaction(string path)
        {
            this.logService?.Debug("repository cancel transaction \"{0}\"", path);
            var patchPath = Path.Combine(this.transactionPath, this.transactions[path] + patchExtension);

            this.transactions.Remove(path);
            this.transactionMessages.Remove(path);
            //DirectoryUtility.Delete(path);
            SvnClientHost.Run("revert", path.WrapQuot(), "-R");
            FileUtility.Delete(patchPath);
        }
Ejemplo n.º 4
0
        public static   SvnLogEventArgs[] Run(string path, long revision, int count)
        {
            var revisionText = revision.ToString();

            if (revision == long.MaxValue)
            {
                revisionText = "head";
            }
            var text = SvnClientHost.Run("log", path.WrapQuot(), "-r", $"{revisionText}:1", "--xml", "-v", "-l", count, "--with-all-revprops");

            return(SvnLogEventArgs.Read(text));
        }
Ejemplo n.º 5
0
 private string Run(params object[] args)
 {
     try
     {
         return(SvnClientHost.Run(args));
     }
     catch (Exception e)
     {
         this.logService.Error(e);
         throw e;
     }
 }
Ejemplo n.º 6
0
        public void CreateRepository(string basePath, string repositoryPath)
        {
            var remotePath = Path.Combine(basePath, remoteName);
            var svnUri     = new Uri(remotePath);

            DirectoryUtility.Create(repositoryPath);
            DirectoryUtility.Prepare(repositoryPath, "tags");
            DirectoryUtility.Prepare(repositoryPath, "trunk");

            SvnServerHost.Run("create", remotePath.WrapQuot(), "--fs-type", "fsfs");
            SvnClientHost.Run("import", "-m", "first", repositoryPath.WrapQuot(), svnUri.ToString().WrapQuot());
            SvnClientHost.Run("checkout", svnUri.ToString().WrapQuot(), repositoryPath.WrapQuot(), "--force");

            CremaLog.Info("crema repository : \"{0}\"", repositoryPath);
            CremaLog.Info("  svn repository : \"{0}\"", remotePath);
        }
Ejemplo n.º 7
0
        public static   SvnLogEventArgs[] Run(string path, long revision)
        {
            var text = SvnClientHost.Run("log", path.WrapQuot(), "-r", $"head:{revision}", "--xml", "-v");

            return(SvnLogEventArgs.Read(text));
        }
Ejemplo n.º 8
0
        public static SvnInfoEventArgs Run(string path)
        {
            var text = SvnClientHost.Run("info", path.WrapQuot(), "--xml");

            return(Parse(text));
        }