コード例 #1
0
    /// <summary>
    /// 获取文件夹路径下所有可提交的文件
    /// </summary>
    /// <param name="path"></param>
    /// <returns></returns>
    public static List <SVNToolPath> GetNeedCommitSVNToolFileList(String path)
    {
        List <SVNToolPath> res        = new List <SVNToolPath>();
        String             commandRes = UESvnOperation.GetSvnOperation().FolderStatus(path);

        if (String.IsNullOrEmpty(commandRes))
        {
            return(res);
        }

        // 拆解SVN结果
        String[] resList = commandRes.Split('\n');
        foreach (string s in resList)
        {
            // 如果字符串中的数据为修改后的
            if (s.Length > 8)
            {
                EnumSVNToolPathType pathType = EnumSVNToolPathType.NO_CONTROL;
                if (s.StartsWith("?"))
                {
                    pathType = EnumSVNToolPathType.NO_CONTROL;
                }
                else if (s.StartsWith("!"))
                {
                    pathType = EnumSVNToolPathType.DEL;
                }
                else
                {
                    pathType = EnumSVNToolPathType.MODIFY;
                }
                res.Add(new SVNToolPath(s.Substring(8).Replace('\\', '/').Trim(), pathType));
            }
        }

        return(res);
    }
コード例 #2
0
 public SVNToolPath(String path, EnumSVNToolPathType pathType)
 {
     this.path     = path;
     this.pathType = pathType;
 }