示例#1
0
        public string Cat(string repoName, string path)
        {
            var repoPath = RepositoriesRoot + "/" + repoName;
            var subPath =  "/" + path;

            var result = SystemProcess.Execute("svnlook", false, $"cat {repoPath} {subPath}");
            if (result.exitCode != 0)
            {
                throw new Exception(string.Join("\r\n", result.errBuffer));
            }
            return  string.Join("\r\n", result.outBuffer);
        }
示例#2
0
        public SvnList List(string repoName, string path)
        {
            var listPath = FileSchemeRepositoriesRoot + "/" + repoName + "/" + path;

            var result = SystemProcess.Execute("svn", false, $"list  --xml \"{listPath}\"");
            var combinedResult = string.Join("\r\n", result.outBuffer);


            var lists = DeserializeXml<SvnLists>(combinedResult);
            return lists.Lists[0];

        }
示例#3
0
 public bool IsRepository(string name)
 {
     var result = SystemProcess.Execute("svnlook", false, $"info {Path.Combine(RepositoriesRoot, name)}");
     return result.exitCode == 0;
 }