我希望能够询问TfsTeamProjectCollection并确定服务器上是否有文件的较新版本。我希望能够执行此操作而无需实际获取文件。
这可能在某处吗?我已经完成了一些工作,到目前为止,还没有完成任何工作。
谢谢。
最简单的方法是QueryHistory在工作区版本和最新版本之间切换;如果它们不同,则服务器上存在更新的最新版本。例如:
versionControlServer.QueryHistory(
serverPath,
VersionSpec.Latest,
0,
RecursionType.Full,
new WorkspaceVersionSpec(workspace),
versionFrom,
null,
Int32.MaxValue,
true,
true);
Run Code Online (Sandbox Code Playgroud)