Пример #1
0
        public static ProcessResult RunSvnProcess(SvnOptions svnLoginOptions, ProcessArgumentBuilder argBuilder)
        {
            argBuilder.AddArgument("--non-interactive");
            argBuilder.AddArgument("--no-auth-cache");

            ProcessInfo info = new ProcessInfo("svn.exe", argBuilder.ToString());

            ProcessExecutor executor = new ProcessExecutor();
            ProcessResult result = executor.Execute(info);
            return result;
        }
Пример #2
0
        public static ProcessResult RunSvnProcess(SvnOptions svnLoginOptions, ProcessArgumentBuilder argBuilder)
        {
            argBuilder.AddArgument("--non-interactive");
            argBuilder.AddArgument("--no-auth-cache");

            ProcessInfo info = new ProcessInfo("svn.exe", argBuilder.ToString());

            ProcessExecutor executor = new ProcessExecutor();
            ProcessResult   result   = executor.Execute(info);

            return(result);
        }
Пример #3
0
        public static int GetSvnRevision(SvnOptions svnOptions)
        {
            ProcessArgumentBuilder argBuilder = new ProcessArgumentBuilder();
            argBuilder.AppendArgument("log");
            argBuilder.AppendArgument("--xml");
            argBuilder.AppendArgument("--limit 1");
            argBuilder.AddArgument(StringHelper.Quote(svnOptions.Url));
            ProcessResult result = RunSvnProcess(svnOptions, argBuilder);

            XmlDocument xml = new XmlDocument();
            xml.LoadXml(result.StandardOutput);

            XmlNode node = xml.SelectSingleNode("/log/logentry/@revision");
            return Convert.ToInt32(node.InnerText);
        }
Пример #4
0
        public static int GetSvnRevision(SvnOptions svnOptions)
        {
            ProcessArgumentBuilder argBuilder = new ProcessArgumentBuilder();

            argBuilder.AppendArgument("log");
            argBuilder.AppendArgument("--xml");
            argBuilder.AppendArgument("--limit 1");
            argBuilder.AddArgument(StringHelper.Quote(svnOptions.Url));
            ProcessResult result = RunSvnProcess(svnOptions, argBuilder);

            XmlDocument xml = new XmlDocument();

            xml.LoadXml(result.StandardOutput);

            XmlNode node = xml.SelectSingleNode("/log/logentry/@revision");

            return(Convert.ToInt32(node.InnerText));
        }