예제 #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));
        }
예제 #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));
        }
예제 #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);
        }
예제 #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));
        }
예제 #5
0
 private string Run(params object[] args)
 {
     try
     {
         return(SvnClientHost.Run(args));
     }
     catch (Exception e)
     {
         this.logService.Error(e);
         throw e;
     }
 }
예제 #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);
        }
예제 #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));
        }
예제 #8
0
        public static SvnInfoEventArgs Run(string path)
        {
            var text = SvnClientHost.Run("info", path.WrapQuot(), "--xml");

            return(Parse(text));
        }