[英]get latest specific project in C#
I have a project that should be get latest to specific date. 我有一个项目应该是最新的具体日期。 I have this code:
我有这个代码:
var serverFolder = pathInTfs;
var localFolder = pathInLocalMachin;
var workingFolder = new WorkingFolder(serverFolder, localFolder);
// Create a workspace mapping
workspace.CreateMapping(workingFolder);
if (!workspace.HasReadPermission)
{
throw new SecurityException(
String.Format("{0} does not have read permission for {1}",
versionControl.AuthorizedUser, serverFolder));
}
// Get the files from the repository
workspace.Get(dateForLatest, GetOptions.Overwrite);
every thing is good but I want to be get latest only directory "pathInTfs" in "pathInLocalMachin" but when program run workspace.Get() every project be get latest. 一切都很好,但我想在“pathInLocalMachin”中获取最新的唯一目录“pathInTfs”,但是当程序运行workspace.Get()时,每个项目都会获得最新的。 How I can get latest one path in my project.
如何在我的项目中获得最新的一条路径。
There are several overloads of Get
which allow you to specify the set of objects you want to get. Get
有几个重载,允许您指定要获取的对象集。 For what you're doing, I think you want Get(GetRequest, GetOptions)
. 对于你正在做的事情,我认为你想要
Get(GetRequest, GetOptions)
。
The GetRequest
includes an ItemSpec
where you can specify a folder to get, and then indicate RecursionType.Full
. GetRequest
包含一个ItemSpec
,您可以在其中指定要获取的文件夹,然后指示RecursionType.Full
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.