zoukankan      html  css  js  c++  java
  • svn签出单个文件

    if (System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(this.Asset.LocalPath)) && System.IO.Directory.GetFiles(System.IO.Path.GetDirectoryName(this.Asset.LocalPath)).Length>0)
                    {
                        return new string[]{
                            string.Format("cd /d "{0}"",System.IO.Path.GetDirectoryName(this.Asset.LocalPath)),
                            string.Format("svn up "{0}" --username "{1}" --password "{2}"",System.IO.Path.GetFileName(this.Asset.LocalPath),this.UserName,this.PassWord)
                        };
                    }
                    else
                    {
                        return new string[]{
                        //string.Format("del /s /q /f {0}",System.IO.Path.Combine(System.IO.Path.GetDirectoryName(this.Asset.LocalPath),"*.*")),
                            string.Format(
                                "svn checkout --depth=empty "{0}" "{3}" --username "{1}" --password "{2}"", 
                                System.IO.Path.GetDirectoryName(this.Asset.LocalPath).Replace('\','/').Replace(string.Format("{0}/{1}",Huawei.SCMSync.SCMConfig.WorkPath.Replace('\','/'),this.Asset.GUID),System.Text.RegularExpressions.Regex.Replace(this.Asset.StorePath,"[\/][^\.\/]+\.(cpp|h|java|c|v|sv)$",string.Empty)), 
                                this.UserName, 
                                this.PassWord,
                                System.IO.Path.GetDirectoryName(this.Asset.LocalPath)
                            ),
                            string.Format("cd /d "{0}"",System.IO.Path.GetDirectoryName(this.Asset.LocalPath)),
                            string.Format("svn up "{0}" --username "{1}" --password "{2}"",System.IO.Path.GetFileName(this.Asset.LocalPath),this.UserName,this.PassWord)
                        };
                    }
  • 相关阅读:
    1002. 查找常用字符
    1047. 删除字符串中的所有相邻重复项
    3. 无重复字符的最长子串
    剑指 Offer 57
    239. 滑动窗口最大值
    476. 数字的补数
    876. 链表的中间结点
    973. 最接近原点的 K 个点
    面试题 02.04. 分割链表
    1616. 分割两个字符串得到回文串
  • 原文地址:https://www.cnblogs.com/yomho/p/3731836.html
Copyright © 2011-2022 走看看