您的位置:首页 > 其它

svn签出单个文件

2014-05-16 11:39 162 查看
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)
};
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: