Exemple #1
0
 /// <summary>
 /// 将枚举转为可以附加的参数
 /// </summary>
 /// <param name="conflictAccept">枚举类型</param>
 /// <returns></returns>
 private static string GetAcceptArg(SvnConflictAccept conflictAccept)
 {
     if (conflictAccept == SvnConflictAccept.None)
     {
         return(string.Empty);
     }
     else
     {
         return("–accept=" + conflictAccept.ToString().ToLower().Replace("_", "-"));
     }
 }
Exemple #2
0
        /// <summary>
        /// SVN解决目录下所有文件冲突,使用Theirs或者Mine
        /// </summary>
        /// <param name="localPath">本地目录</param>
        /// <param name="conflictAccept">冲突接受方法枚举</param>
        public static void SolveAllConfilct(string localPath, SvnConflictAccept conflictAccept)
        {
            InitInner();
            var list = new List <string>();

            if (ExistConflict(localPath, out list))
            {
                foreach (var filePath in list)
                {
                    SolveConfilct(filePath, conflictAccept);
                }
            }
        }
Exemple #3
0
 /// <summary>
 /// SVN直接解决文件冲突
 /// </summary>
 /// <param name="localFilePath">本地文件路径</param>
 /// <param name="conflictAccept">冲突接受方法枚举</param>
 public static void SolveConfilct(string localFilePath, SvnConflictAccept conflictAccept)
 {
     InitInner();
     SvnExecuteOut($"resolve {GetAcceptArg(conflictAccept)} \"{localFilePath}\"");
 }