首页 > 其他 > 详细

svn签出单个文件

时间:2014-05-19 11:00:37      阅读:407      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
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)
                    };
                }
bubuko.com,布布扣

 

svn签出单个文件,布布扣,bubuko.com

svn签出单个文件

原文:http://www.cnblogs.com/yomho/p/3731836.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!