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)
                        };
                    }
  • 相关阅读:
    Logwatch的配置与使用
    Redirect HTTP to HTTPS on Tomcat
    RedHat7搭建yum源服务器
    卸载RedHat7自带的yum,安装并使用网易163源
    15个Linux Yum命令实例--安装/卸载/更新
    GitHub详细教程
    RedHat7 Git 安装使用
    RedHat7 SELinux
    RedHat7配置IdM server
    IIS Shared Configuration
  • 原文地址:https://www.cnblogs.com/yomho/p/3731836.html
Copyright © 2011-2022 走看看