I want to be able to interrogate TfsTeamProjectCollection and determine if there is a newer version of a file on the server. I would like to be able to do this without actually fetching the file.
Is this possible somewhere? I've done some scratching around and so far drawing blanks.
Thanks.
The easiest way is to QueryHistory
between the workspace version and the latest version; if they differ, there exists a newer latest version on the server. Eg:
versionControlServer.QueryHistory(
serverPath,
VersionSpec.Latest,
0,
RecursionType.Full,
new WorkspaceVersionSpec(workspace),
versionFrom,
null,
Int32.MaxValue,
true,
true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With